简体   繁体   English

无法运行 NPM 在 create-react-app 之后启动

[英]Not able to run NPM Start after create-react-app

As I am learning the react for the first time I need to install the react-app but getting below error.当我第一次学习反应时,我需要安装反应应用程序但出现错误。 I have tried everything from the instructions in the error log and several other available solutions of StackOverflow but still not able to solve and getting the same error.我已经尝试了错误日志中的说明以及 StackOverflow 的其他几个可用解决方案中的所有内容,但仍然无法解决并得到相同的错误。

Here is the pic of below:这是下面的图片:

截屏

And here is the log:这是日志:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Mr Rushil Dewaskar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v12.17.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle jsfx@0.1.0~prestart: jsfx@0.1.0
6 info lifecycle jsfx@0.1.0~start: jsfx@0.1.0
7 verbose lifecycle jsfx@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle jsfx@0.1.0~start: PATH: C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Mr Rushil Dewaskar\jsfx\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\Wbem;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Common Files\ArcSoft\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk-11.0.4;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Python\Python38-32\;C:\Windows\System32\wbem\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\Wbem;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Common Files\ArcSoft\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk-11.0.4;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\Mr Rushil Dewaskar\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm;C:\Windows\System32\ variable;C:\Windows\System32\;
9 verbose lifecycle jsfx@0.1.0~start: CWD: C:\Users\Mr Rushil Dewaskar\jsfx
10 silly lifecycle jsfx@0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle jsfx@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle jsfx@0.1.0~start: Failed to exec start script
13 verbose stack Error: jsfx@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Mr Rushil Dewaskar\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid jsfx@0.1.0
15 verbose cwd C:\Users\Mr Rushil Dewaskar\jsfx
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mr Rushil Dewaskar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.17.0
19 verbose npm  v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error jsfx@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the jsfx@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Please Help As soon as possible.请尽快帮助。

The solution to your problem is to remove the whitespaces in your username.您的问题的解决方案是删除用户名中的空格。 In fact, the whitespaces anywhere in your path.事实上,路径中任何地方的空格。 In your case, your username is Mr Rushil Dewasker.在您的情况下,您的用户名是 Rusil Dewasker 先生。 That's two whitespaces.那是两个空格。 Change it to something without spaces and rebuild your project.将其更改为没有空格的内容并重建您的项目。 It should work fine after that.之后它应该可以正常工作。 I had this problem once, myself.我自己也遇到过这个问题。

Well the error itself shows some way to solve this issue.好吧,错误本身显示了解决此问题的某种方法。 Have you tried that?你试过吗?

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

相关问题 在创建反应项目时在“npx create-react-app my-app”之后运行命令“npm start”时出错 - getting error when run command 'npm start' after 'npx create-react-app my-app' in creating a react project 在运行“create-react-app my-app”后尝试运行“npm start”时出现一堆错误 - Get a bunch of errors when trying to run “npm start” after running “create-react-app my-app” 使用 create-react-app 创建新的 react 项目后,npm start 失败 - npm start fails after creating a new react project using create-react-app 仅在 Documents 目录中运行 create-react-app 后,Npm 开始不起作用 - Npm start not working after running create-react-app ONLY in Documents directory 如何修复此 npm 开始不起作用(在 npx create-react-app 之后) - how to fix this npm start not working ( after npx create-react-app ) 在npm上启动启动应用程序时出错 - Getting error on npm start create-react-app create-react-app 和 npm 启动时出现错误“找不到模块” - Error "Module not found" while create-react-app and npm start 可以用 Nodejs 开头的 Create-React-App npm 吗? - Can you use Create-React-App npm start with nodejs? 将 Nginx 与 Create-React-App 开发服务器和 npm start 结合使用 - Using Nginx with Create-React-App dev server and npm start npm 使用 create-react-app 时启动不运行 - npm start not running when using create-react-app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM