老师,按要求设置 BROWSER=none react-scripts start,启动后报错:
'BROWSER' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! main@0.1.0 start: `BROWSER=none react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the main@0.1.0 start 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\Gree\AppData\Roaming\npm-cache\_logs\2020-01-27T12_21_05_394Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! remote-control@1.0.0 start:render: `cd app/renderer/src/main && npm start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the remote-control@1.0.0 start:render script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gree\AppData\Roaming\npm-cache\_logs\2020-01-27T12_21_05_536Z-debug.log
在网上搜不到解决方法,望老师支招……
展开
作者回复: win上的话应该是环境变量不能这么设,你装一个cross-env,之后在BROWSER前面加上cross-env