PS C:\Users\user\Desktop> npx create-react-app test
Starting the development server...
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@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\user\AppData\Roaming\npm-cache\_logs\2020-04-16T05_36_38_598Z-debug.log
PS C:\Users\user\Desktop\test>
我上網查了很久,使用過幾個方法
可是結果npm start都是跑出以上錯誤
本來可以正常使用
用mac也可以開
是不是我忽略了windows的什麽問題QQ
謝謝大家~
可能是全域的問題 要測看看才知道
先cd 專案中的node_modules>.bin
cd node_modules\.bin
再打
npm start
看看能不能開啟