Node.js 创建react应用程序后无法运行NPM启动

Node.js 创建react应用程序后无法运行NPM启动,node.js,reactjs,npm,create-react-app,npm-start,Node.js,Reactjs,Npm,Create React App,Npm Start,当我第一次学习react时,我需要安装react应用程序,但出现以下错误。 从错误日志中的说明到StackOverflow的其他几种可用解决方案,我都试过了,但仍然无法解决并得到相同的错误 图为下图: 下面是日志: 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 Rush

当我第一次学习react时,我需要安装react应用程序,但出现以下错误。 从错误日志中的说明到StackOverflow的其他几种可用解决方案,我都试过了,但仍然无法解决并得到相同的错误

图为下图:

下面是日志:

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 ]

请尽快提供帮助。

错误本身显示了解决此问题的某种方法。你试过了吗?

解决问题的办法是删除用户名中的空白。事实上,在您的路径中的任何位置都有空格。 就你而言,你的用户名是Rushil Dewasker先生。这是两个空格。 将其更改为没有空格的内容,然后重建项目。在那之后它应该可以正常工作。
我自己也曾遇到过这个问题。

您是否使用create react应用程序创建新项目?我的第一个倾向是使用npx命令重新安装create react应用程序,除非您在本地安装,否则npm将正常工作。您是否可以遵循,可能是使用Thread?同时检查您是否具有网页包依赖性