找不到node_modules/node-sass/vendor模块的解决办法

Error: ENOENT: no such file or directory, scandir ‘…/node_modules/node-sass/vendor’

这个错误的意思就是找不到node_modules/node-sass/vendor模块。

 error  in ./node_modules/@choerodon/base/lib/src/app/iam/containers/global/menu-setting/MenuSetting.scss

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir 'D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\vendor'
    at Object.readdirSync (fs.js:872:3)
    at Object.getInstalledBinaries (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\extensions.js:133:13)
    at foundBinariesList (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\errors.js:20:15)
    at foundBinaries (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\errors.js:15:5)
    at Object.module.exports.missingBinary (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\errors.js:45:5)
    at module.exports (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\binding.js:15:30)
    at Object.<anonymous> (D:\Work\ICSS\paas\choerodon-front\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)

 @ ./node_modules/@choerodon/base/lib/src/app/iam/containers/global/menu-setting/MenuSetting.scss 2:26-235 43:4-64:5 46:18-227
 @ ./node_modules/@choerodon/base/lib/src/app/iam/containers/global/menu-setting/MenuSetting.js
 @ ./node_modules/@choerodon/base/lib/src/app/iam/containers/global/menu-setting/index.js
 @ ./node_modules/@choerodon/base/lib/src/app/iam/containers/IAMIndex.js
 @ ./node_modules/@choerodon/boot/tmp/routes.index.js
 @ ./node_modules/@choerodon/boot/tmp/entry.index.js
 @ multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./node_modules/@choerodon/boot/tmp/entry.index.js

解决办法:

npm rebuild node-sass

你可能感兴趣的:(项目问题整理,javascript,node.js,webpack,gulp,npm)