npm install node-sass:出现错误

Error: ENOENT: no such file or directory, scandir '/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:952:18)
    at Object.getInstalledBinaries (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/extensions.js:128:13)
    at foundBinariesList (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/sass-loader/lib/loader.js:3:14)

解决方法:

npm rebuild node-sass
Logo

前往低代码交流专区

更多推荐