简体   繁体   English

当我尝试开始响应时,为什么会出现此错误?

[英]Why am I getting this error when I try to start react?

I installed node JS in my device only last week and its version is 12.18.1 and npm version is 6.14.5.我上周才在我的设备上安装了节点 JS,它的版本是 12.18.1,npm 版本是 6.14.5。 npx create-react-app is working and I get all the node modules and other files but when I try to start it gives be following error. npx create-react-app 正在工作,我得到了所有节点模块和其他文件,但是当我尝试启动它时出现以下错误。 PS: I changed the folder and then started as npm start. PS:我改了文件夹然后启动为npm启动。

    npm start
Starting the development server...

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84: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! projectreact@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the projectreact@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-06-28T06_35_26_852Z-debug.log

Please help developers!!请帮助开发者!!

You can try using command:您可以尝试使用命令:

lsof -i: port number lsof -i:端口号

to get list of all the processes running on the port.获取端口上运行的所有进程的列表。

And then kill the process using command kill -9 Process Id然后使用命令kill -9 Process Id 杀死进程

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我尝试在webpack中使用react-router时为什么出现jsx-loader错误 - Why am I getting a jsx-loader error when I try to use react-router with webpack> 为什么在 react 中运行 npm start 时出现错误? - Why am I getting error when I run npm start in react? 为什么在使用 npm 启动时运行反应应用程序时出现此错误? - Why am i getting this error when running react app while using npm start? 当我尝试使用“npm i react-bootstrap”安装 React-Bootstrap 时,为什么会出现“无法读取未定义的属性‘长度’”错误? - Why am I getting a "Cannot read property 'length' of undefined" error when I try to install React-Bootstrap using "npm i react-bootstrap"? 当我尝试安装反应图标时收到一条错误消息 - I am getting an error message when I try to install react icons 当我尝试运行我的 React 项目时出现错误 - I am getting an error when I try to run my react project React App:为什么当我尝试运行 npm start 脚本时出现错误? - React App: Why I get an error when I try to run npm start script? 为什么每次创建React应用并使用“ npm start”运行时都在命令行中收到此错误? - Why i am getting this error in Command Line every time i create a react app and run with “npm start”? 为什么我收到未定义的错误错误? - Why am I a getting an error that react is undefined? 为什么我在控制台中未定义,当我尝试使用 typescript 订阅和使用我的上下文并做出反应时 - Why am i getting undefined in my console, when i try to subscribe and use my context using typescript and react
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM