VUE:安装npm install报错Module build failed: Error: ENOENT: no such file or directory, scandir

2年前 (2022) 程序员胖胖胖虎阿
229 0 0

报错信息如下:

Module build failed: Error: ENOENT: no such file or directory, scandir 'D:\renren-fast-vue\node_modules\node-sass\vendor'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.getInstalledBinaries (D:\renren-fast-vue\node_modules\node-sass\lib\extensions.js:132:13)
    at foundBinariesList (D:\renren-fast-vue\node_modules\node-sass\lib\errors.js:20:15)
    at foundBinaries (D:\renren-fast-vue\node_modules\node-sass\lib\errors.js:15:5)
    at Object.<anonymous> (D:\renren-fast-vue\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\renren-fast-vue\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:653:30)

解决方法如下:

重新执行 npm rebuild node-sassVUE:安装npm install报错Module build failed: Error: ENOENT: no such file or directory, scandir

最后解决启动成功:

在这里插入图片描述

相关文章

暂无评论

暂无评论...