node 업데이트 버전 후sass에서 해결 방법을 컴파일할 수 없음

5050 단어 npm
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. (/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. (/Users/haoxiaojun/xfs-git/fecode/workdesk/vue-h5/node_modules/sass-loader/lib/loader.js:3:14)

해결 방법:
npm rebuild node-sass

좋은 웹페이지 즐겨찾기