Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

2020-7-7 孤独求学人 Vue

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/vendor'
    at Object.readdirSync (fs.js:785:3)
    at Object.getInstalledBinaries (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/extensions.js:133:13)
    at foundBinariesList (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/Users/shiwei/Documents/admin-zeus/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at getDefaultSassImpl (/Users/shiwei/Documents/admin-zeus/node_modules/sass-loader/dist/index.js:198:10)
    at Object.loader (/Users/shiwei/Documents/admin-zeus/node_modules/sass-loader/dist/index.js:80:29)


使用npm install 安装模板后,没有报错

但是通过npm run dev 启动项目,报上面的错误

这个是因为node-sass没安装好,所以要重新安装
运行命令:npm install node-sass --registry=https://registry.npm.taobao.org

标签: install node-sass vu vue npm

评论(0) 浏览(1960)

Powered by emlog 豫ICP备15004178号-1