react-slingshot: Start script fails after initial installation.

Node version: v8.1.4

npm version: 5.0.3

Operating system: macOS Sierra v10.12.5

Command line used: iTerm2

Steps to reproduce:

  • (For issue 1) 1.) npm run setup or npm install 2.) npm start -s or npm start

  • (For issue 2) After issue 1 is resolved, run npm start -s or npm start

Issue 1: After initial installation via npm run setup or npm install, start script fails. Error output provided below.

Error Output:

2017-07-18 00:01 node[20270] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-07-18 00:01 node[20270] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1360:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 test: `jest "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.0 test 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/branden/.npm/_logs/2017-07-18T04_01_38_701Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 test:watch: `npm run test -- --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.0 test:watch 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/branden/.npm/_logs/2017-07-18T04_01_38_725Z-debug.log
ERROR: "test:watch" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 start: `npm-run-all --parallel test:watch open:src lint:watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.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/branden/.npm/_logs/2017-07-18T04_01_38_821Z-debug.log

Issue 2: After fixing issue 1 (see above), start script fails. Error output provided below.

Error Output:

 RUNS  src/components/FuelSavingsForm.spec.js
[BS] Access URLs:
 -------------------------------------
       Local: http://localhost:3000
    External: http://192.168.0.22:3000
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.0.22:3001
 -------------------------------------
[BS] Serving files from: src
[BS] Watching files...
can't resolve reference #/definitions/basicConfig from id #
can't resolve reference #/definitions/basicConfigOrBoolean from id #
 PASS  src/components/FuelSavingsForm.spec.jsnfigOrBoolean from id #
 PASS  src/components/FuelSavingsResults.spec.js
 PASS  src/store/store.spec.js
 PASS  src/reducers/fuelSavingsReducer.spec.js
 PASS  src/utils/fuelSavingsCalculator.spec.js
 PASS  src/actions/fuelSavingsActions.spec.js
 PASS  src/utils/mathHelper.spec.js
 PASS  src/components/AboutPage.spec.js

 PASS  src/components/FuelSavingsTextInput.spec.js

 RUNS  src/containers/FuelSavingsPage.spec.js
/Users/branden/Documents/GitHub/react-slingshot/tools/setup/setupPrompts.js (1/0)
  ✖  6:28  Unnecessary escape character: \.  no-useless-escape

✖ 1 error (12:05:24 AM)


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 lint: `esw webpack.config.* src tools --color`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.0 lint 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/branden/.npm/_logs/2017-07-18T04_05_24_348Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 lint:watch: `npm run lint --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.0 lint:watch 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/branden/.npm/_logs/2017-07-18T04_05_24_377Z-debug.log
ERROR: "lint:watch" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-slingshot@7.0.0 start: `npm-run-all --parallel test:watch open:src lint:watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@7.0.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/branden/.npm/_logs/2017-07-18T04_05_24_482Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 38 (12 by maintainers)

Commits related to this issue

Most upvoted comments

For those still having this issue I recently, setup a new laptop with react-slingshot.

https://gist.github.com/kwelch/618a156d9aa7e1702f6b3cd2e6abc5b2 (The prop-types part has been fixed with the recent merge of the React 16 upgrade)

The believe I ran across the same issue as others in this thread and installing watchman fixed the issue completely.

Hey @DaneTheory and @coryhouse myself and another developer were receiving this error as well. We found out that watchman is required / a dependency, but not annotated in your docs. After running brew install watchman the build works as intended.

@jonasfrid - Did you install watchman as described in this thread?

brew install watchman

@hundsim, great idea. Would you be willing to put up a PR to update the installation guide?

Can confirm that brew install watchman solved it for me as well.

Wouldn’t it be a good idea to include that step to the installation guide?

Closing as it appears installing watchman resolves this issue for the remaining cases.

To install watchman run the following command to install using homebrew brew install watchman

Alternatively, you can disable watchmen on jest calls by adding the --no-watchman flag.

@DaneTheory may I ask how you fixed issue #1 above? I’m stuck with the same issue. Node version: v6.11.1

npm version: 3.10.10

Operating system: macOS Sierra v10.12.5

Determining test suites to run...2017-07-22 21:47 node[32781] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-07-22 21:47 node[32781] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1018:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1420:11)

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test" "--" "--watch"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! test-app@0.1.0 test: `jest "--watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-app@0.1.0 test script 'jest "--watch"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the test-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     jest "--watch"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs test-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls test-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jonas/Sites/br/react-slingshot/npm-debug.log

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "run" "test:watch"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! test-app@0.1.0 test:watch: `npm run test -- --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-app@0.1.0 test:watch script 'npm run test -- --watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the test-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run test -- --watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs test-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls test-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jonas/Sites/br/react-slingshot/npm-debug.log
ERROR: "test:watch" exited with 1.

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! test-app@0.1.0 start: `npm-run-all --parallel test:watch open:src lint:watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-app@0.1.0 start script 'npm-run-all --parallel test:watch open:src lint:watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the test-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm-run-all --parallel test:watch open:src lint:watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs test-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls test-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jonas/Sites/br/react-slingshot/npm-debug.log

I have install the following cmd npm install -g create-react-app create-react-app .

npm install --save react-router

and then i am starting dev server by using cmd

npm start

but i am facing an Error this type

D:\react\routes>npm start

routes@0.1.0 start D:\react\routes react-scripts start

‘react-scripts’ is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! routes@0.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the routes@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\kashif\AppData\Roaming\npm-cache_logs\2017-12-12T18_47_37 _524Z-debug.log

had similar issues, tried installing watchman with npm, failed. uninstalled it. installed it using brew. worked. thanks.

@DaneTheory I’ve implemented 6c54e55 changes and the error is fixed. Thanks!!!

@nickytonline We may want to set our jest to not use watchman and update docs to explain that the test script can be faster if you install watchman and change the settings.