运行 npm run serve 报错RROR Error: Cannot find module ‘postcss‘
运行 npm run serve 报错RRORError: Cannot find module ‘postcss’RRORError: Cannot find module 'postcss'Require stack:- D:\project\vue-cli3 demo\node_modules\autoprefixer\lib\autoprefixer.js- D:\project\vue-
·
运行 npm run serve 报错RROR Error: Cannot find module ‘postcss’
RROR Error: Cannot find module 'postcss'
Require stack:
- D:\project\vue-cli3 demo\node_modules\autoprefixer\lib\autoprefixer.js
- D:\project\vue-cli3 demo\node_modules\@vue\cli-service\lib\config\css.js
- D:\project\vue-cli3 demo\node_modules\@vue\cli-service\lib\Service.js
- D:\project\vue-cli3 demo\node_modules\@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module 'postcss'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app-m@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-m@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\小蠢蛋\AppData\Roaming\npm-cache\_logs\2021-04-01T13_26_11_806Z-debug.log
D:\project\vue-cli3 demo>npm i -D postcss postcss-cli
输入:npm i -D postcss postcss-cli
持续报错:
error in ./src/App.vue?vue&type=style&index=0&lang=scss&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Cannot find module 'node-sass'
安装node-sass,输入 cnpm install node-sass
问题解决,运行成功。
更多推荐
已为社区贡献3条内容
所有评论(0)