簡體   English   中英

在創建 React 應用程序時我缺少什么嗎?

[英]Is something am i missing while creating an React app?

我創建了一個反應應用程序,當我運行它時顯示以下錯誤。 首先,我認為我在創建應用程序時犯了一個錯誤。 之后,我刪除了它並創建了另一個應用程序,它顯示了相同的錯誤!

events.js:200
  throw er; // Unhandled 'error' event
  ^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21)     
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fruit_details@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fruit_details@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\abhis\AppData\Roaming\npm-cache\_logs\2020-01-09T06_29_21_939Z-debug.log

也許這是反應腳本的問題。 只需在命令中轉到您的文件夾並使用以下命令重新安裝:

npm install react-scripts@2.1.8
npm start

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM