我的第一个选择是在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.