人人开源 VUE项目报错./src/assets/scss/index.scssModule build failed: Err

举报
Java李杨勇 发表于 2021/11/26 23:35:51 2021/11/26
【摘要】 ​ Module build failed: Error: ENOENT: no such file or directory, scandir ‘C:\Users\administrator\Desktop\renren-fast-vue\node_modules\node-sass\vendor’at Object.fs.readdirSync (fs.js:861:3)at Objec...

 

Module build failed: Error: ENOENT: no such file or directory, scandir ‘C:\Users\administrator\Desktop\renren-fast-vue\node_modules\node-sass\vendor’
at Object.fs.readdirSync (fs.js:861:3)
at Object.getInstalledBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\binding.js:15:30)
at Object. (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:678:30)

@ ./src/assets/scss/index.scss 4:14-212 13:3-17:5 14:22-220
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8001 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./src/views/demo/ueditor.vue

Module build failed: Error: ENOENT: no such file or directory, scandir ‘C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\vendor’
at Object.fs.readdirSync (fs.js:861:3)
at Object.getInstalledBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\binding.js:15:30)
at Object. (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-

@ ./node_modules/vue-style-loader!./node_modules/css-loader?{“sourceMap”:false}!./node_modules/vue-loader/lib/style-compiler?{“vue”:true,“id”:“data-v-9baacec6”,“scoped”:false,“hasInlineConfig”:false}!./node_modules/sass-loader/lib/loader.js?{“sourceMap”:false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/views/demo/ueditor.vue 4:14-399 13:3-17:5 14:22-407
@ ./src/views/demo/ueditor.vue
@ ./src/views ^./.*.vue$
@ ./src/router/import-development.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8001 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./src/views/common/login.vue

Module build failed: Error: ENOENT: no such file or directory, scandir ‘C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\vendor’
at Object.fs.readdirSync (fs.js:861:3)
at Object.getInstalledBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\binding.js:15:30)
at Object. (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\Users\xyy’s\Desktop\renren-fast-vue\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:678:30)

@ ./node_modules/vue-style-loader!./node_modules/css-loader?{“sourceMap”:false}!./node_modules/vue-loader/lib/style-compiler?{“vue”:true,“id”:“data-v-20137d6c”,“scoped”:false,“hasInlineConfig”:false}!./node_modules/sass-loader/lib/loader.js?{“sourceMap”:false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/views/common/login.vue 4:14-397 13:3-17:5 14:22-405
@ ./src/views/common/login.vue
@ ./src/views ^./.*.vue$
@ ./src/router/import-development.js

可以尝试的几种解决方法:

1.node_modules卸载重新执行 npm install

2.切换淘宝镜像 然后  npm config set registry https://registry.npm.taobao.org

3.执行

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver

4.npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/(成功)

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。