Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs don';无法理解bebug.log文件,无法在react项目上运行npm start_Reactjs_Debugging_Npm Start - Fatal编程技术网

Reactjs don';无法理解bebug.log文件,无法在react项目上运行npm start

Reactjs don';无法理解bebug.log文件,无法在react项目上运行npm start,reactjs,debugging,npm-start,Reactjs,Debugging,Npm Start,有人能帮我解释一下如何读取这个debug.log文件吗? 我正在尝试为react项目运行npm start。 我尝试通过npm安装、npm审计修复程序再次安装npm,然后 反应脚本启动后,我尝试过的任何东西似乎都不起作用 下面是代码 ``` info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@6.10.2

有人能帮我解释一下如何读取这个debug.log文件吗? 我正在尝试为react项目运行npm start。 我尝试通过npm安装、npm审计修复程序再次安装npm,然后 反应脚本启动后,我尝试过的任何东西似乎都不起作用

下面是代码

```
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.10.2
3 info using node@v12.9.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle website@0.1.0~prestart: website@0.1.0
6 info lifecycle website@0.1.0~start: website@0.1.0
7 verbose lifecycle website@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle website@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin
9 verbose lifecycle website@0.1.0~start: CWD: /Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io
10 silly lifecycle website@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle website@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle website@0.1.0~start: Failed to exec start script
13 verbose stack Error: website@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:209:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:209:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid website@0.1.0
15 verbose cwd /Users/inhyechoi/Desktop/InhyeChoi/react/inhyechoi-portfolio/inhyechoi.github.io
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.9.0
19 verbose npm  v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error website@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the website@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 ]
```
```
信息如果以ok结尾,它工作了
1详细cli['/usr/local/bin/node','/usr/local/bin/npm','start']
2信息使用npm@6.10.2
3信息使用node@v12.9.0
4详细的运行脚本['prestart','start','poststart']
5信息生命周期website@0.1.0~prestart:website@0.1.0
6信息生命周期website@0.1.0~start:website@0.1.0
7详细的生命周期website@0.1.0~start:生命周期中的不安全烫发为true
8详细的生命周期website@0.1.0~start:PATH:/usr/local/lib/node\u modules/npm/node\u modules/npm生命周期/node-gyp-bin:/Users/inhyechoi/Desktop/inhyechoi/react/inhyechoi/portfolio/inhyechoi.github.io/node\u-modules/.bin:/Library/Frameworks/Python.Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/sbin:/usr/sbin:/Library/Apple/usr/usr/sbin:/Library/Python
9详细的生命周期website@0.1.0~start:CWD:/Users/inhyechoi/Desktop/inhyechoi/react/inhyechoi公文包/inhyechoi.github.io
10愚蠢的生命周期website@0.1.0~start:Args:['-c','react scripts start']
11愚蠢的生命周期website@0.1.0~start:Returned:code:1信号:null
12信息生命周期website@0.1.0~start:无法执行启动脚本
13详细堆栈错误:website@0.1.0开始:`react脚本开始`
13详细堆栈退出状态1
13 EventEmitter上的详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm lifecycle/index.js:326:16)
13 EventEmitter.emit上的详细堆栈(events.js:209:13)
13子进程上的详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm lifecycle/lib/spawn.js:55:14)
13 ChildProcess.emit上的详细堆栈(events.js:209:13)
13 maybeClose的详细堆栈(internal/child_process.js:1021:16)
13 Process.ChildProcess.\u handle.onexit处的详细堆栈(internal/child\u Process.js:283:5)
14详细的pkgidwebsite@0.1.0
15详细cwd/Users/inhyechoi/Desktop/inhyechoi/react/inhyechoi公文包/inhyechoi.github.io
16详细达尔文19.4.0
17详细argv“/usr/local/bin/node”“/usr/local/bin/npm”“开始”
18详细节点v12.9.0
19详细的npm v6.10.2
20错误代码ELIFECYCLE
21错误1
22错误website@0.1.0开始:`react脚本开始`
22错误退出状态1
23发生错误时失败website@0.1.0开始脚本。
23错误这可能不是npm的问题。上面可能还有其他日志输出。
24详细退出[1,true]
```

我试图安装纱线,看看它是否正常工作

brew安装纱线

我注意到index.html/index.js文件都放错了位置。所以我把它们放在正确的文件夹里,它成功了

所以我卸载了纱线
brew卸载纱线

现在使用
npm启动


来运行项目

我试着安装纱线,看看它是否工作正常

brew安装纱线

我注意到index.html/index.js文件都放错了位置。所以我把它们放在正确的文件夹里,它成功了

所以我卸载了纱线
brew卸载纱线

现在使用
npm启动


来运行项目

也许可以尝试删除本地node_modules目录,然后运行
npm install
?@adamjelinski感谢Adam,我确实安装得很好,但我无法运行npm start基于我的快速搜索,这个错误可能与缺少依赖项有关,这就是为什么完全重新下载它们听起来像是一件值得尝试的事情。(运行
npm install
时依赖项已断开,可以说不需要安装依赖项)@adamjelski(来自我的quick search npm ci)似乎是我将深入研究的解决方案之一,但我会记住你的建议。谢谢,一旦我解决了,我会给你贴标签@Adamjelinski所以npm安装/npm ci都不起作用可能会尝试删除本地node_modules目录,然后运行
npm安装
?@adamjelinski感谢Adam,我安装得很好,但我无法运行npm start基于我所做的快速搜索,此错误可能与缺少依赖项有关,这就是为什么完全重新下载它们听起来是一件值得尝试的好事情。(运行
npm install
时依赖项已断开,可以说不需要安装依赖项)@adamjelski(来自我的quick search npm ci)似乎是我将深入研究的解决方案之一,但我会记住你的建议。谢谢,一旦我解决了,我会给你贴标签@Adamjelinskiso npm安装/npm ci均未工作