【问题标题】:How to fix 'Failed at the est-ggjr@0.1.0 start script'-error如何修复“在 est-ggjr@0.1.0 启动脚本失败”-错误
【发布时间】:2019-10-03 20:55:47
【问题描述】:

几周以来,我在 Node.js/React/npm 上遇到了一个大问题。 在npx create-react-app之后,我想用npm start测试它,但是这个错误是在终端写的:

Starting the development server...

/est-ggjr/node_modules/chokidar/lib/fsevents-handler.js:28
  return (new fsevents(path)).on('fsevent', callback).start();
          ^

TypeError: fsevents is not a constructor
    at createFSEventsInstance (/est-ggjr/node_modules/chokidar/lib/fsevents-handler.js:28:11)
    at setFSEventsListener (/est-ggjr/node_modules/chokidar/lib/fsevents-handler.js:82:16)
    at FSWatcher.FsEventsHandler._watchWithFsEvents (/est-ggjr/node_modules/chokidar/lib/fsevents-handler.js:252:16)
    at FSWatcher.<anonymous> (/est-ggjr/node_modules/chokidar/lib/fsevents-handler.js:386:25)
    at LOOP (fs.js:1570:14)
    at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! est-ggjr@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the est-ggjr@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!     /Users/Leonardo/.npm/_logs/2019-08-15T22_29_44_658Z-debug.log
MacBook-Pro-Apple:est-ggjr Leonardo$ 

我已经完全重新安装了node.js,但是还是有这个错误。

日志文件:

0 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.9.0
3 info using node@v10.16.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle est-ggjr@0.1.0~prestart: est-ggjr@0.1.0
6 info lifecycle est-ggjr@0.1.0~start: est-ggjr@0.1.0
7 verbose lifecycle est-ggjr@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle est-ggjr@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/est-ggjr/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle est-ggjr@0.1.0~start: CWD: /est-ggjr
10 silly lifecycle est-ggjr@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle est-ggjr@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle est-ggjr@0.1.0~start: Failed to exec start script
13 verbose stack Error: est-ggjr@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:301:16)
13 verbose stack     at EventEmitter.emit (events.js:198: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:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid est-ggjr@0.1.0
15 verbose cwd /est-ggjr
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v10.16.2
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error est-ggjr@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the est-ggjr@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 ]

如果有人可以帮助我,我很高兴,我真的很绝望:(

【问题讨论】:

    标签: node.js reactjs npm


    【解决方案1】:

    直到今天,我还没有找到答案。 我安装了纱线,一切都很好。

    【讨论】:

      猜你喜欢
      • 2021-01-02
      • 2020-07-31
      • 1970-01-01
      • 2022-06-13
      • 2020-08-08
      • 2014-12-19
      • 1970-01-01
      • 2011-02-12
      • 2019-09-02
      相关资源
      最近更新 更多