【问题标题】:ELIFECYCLE error while installing existing react project on windows在 Windows 上安装现有反应项目时出现 ELIFECYCLE 错误
【发布时间】:2019-11-08 11:30:53
【问题描述】:
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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.12.0
3 info using node@v12.13.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle mypro@0.1.0~prestart: mypro@0.1.0
6 info lifecycle mypro@0.1.0~start: mypro@0.1.0
7 verbose lifecycle mypro@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle mypro@0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\test\node_modules\.bin;C:\Program Files\Java\jdk-12.0.1\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Users\user5\AppData\Roaming\npm;C:\Users\user5\AppData\Local\Yarn\bin
9 verbose lifecycle mypro@0.1.0~start: CWD: D:\test
10 silly lifecycle mypro@0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle mypro@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle mypro@0.1.0~start: Failed to exec start script
13 verbose stack Error: mypro@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
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 mypro@0.1.0
15 verbose cwd D:\test
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.13.0
19 verbose npm  v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error mypro@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the mypro@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 ]

我尝试了什么:将项目复制到新文件夹并再次运行 npm install,清除 npm 缓存

但似乎没有任何效果。我也安装了新的 node js 和lateset yarn。

【问题讨论】:

    标签: reactjs npm npm-install


    【解决方案1】:

    面对这个确切的问题,

    对我来说,它通过删除 package-lock.json 并重新运行 npm install 来工作

    如果不能解决,请尝试

    1.delete package-lock.json 2.npm缓存清理--force 3.npm安装 4.npm启动

    【讨论】:

      猜你喜欢
      • 2020-03-26
      • 2016-02-25
      • 2017-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多