vue错误:Module build failed: Error: Cannot find module 'node-sass'

vue错误:

Module build failed: Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.sassLoader (E:\Javaweb实训 (2)\源码\news_fore\node_modules\sass-loader\lib\loader.js:46:72)

 @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-0dbd9e67","scoped":true,"hasInlineConf
ig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/pages/layout/TheLayoutHeader.vue 4:14-394 13:3-17
:5 14:22-402
 @ ./src/pages/layout/TheLayoutHeader.vue
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/layout/TheLayout.vue
 @ ./src/pages/layout/TheLayout.vue
 @ ./src/router/staticRouter.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

解决办法:cnpm install node-sass@latest

你可能感兴趣的:(环境和服务问题)