npm run dev“'webpack'不被识别为内部或外部命令”

时间:2019-07-17 16:06:33

标签: django npm npm-start

我的第一个选择是在Django后端使用react前端。

npm run dev可以在Mac上运行并渲染前端,但在Windows PC上无法显示

我在两台计算机上都运行相同版本的node&npm

尝试过npm cache clean --force并重新安装npm,以前在我的Mac上遇到白纸问题时已经遇到过。

错误代码;

> webpack --mode development --watch ./marketmaker/frontend/src/index.js --output ./marketmaker/frontend/static/frontend/main.js

'webpack' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fullstack-calc@1.0.0 dev: `webpack --mode development --watch ./marketmaker/frontend/src/index.js --output ./marketmaker/frontend/static/frontend/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fullstack-calc@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

0 个答案:

没有答案