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 setupornpm install2.)npm start -sornpm start -
(For issue 2) After issue 1 is resolved, run
npm start -sornpm 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
- Issue #449 fix Issue 1: Removed extra dashes located in the package.json test scripts that cause start script to fail. Issue 2: Removed escape characters found in setupPrompts.js which cause linting... — committed to DaneTheory/react-slingshot by deleted user 7 years ago
- Revert PR #450 Removed change that removed additional dashes in npm test scripts in favor of adding jest-cli as a devDep. This commit instead focusses on issue 2 from #449 where setupPrompts.js had ... — committed to DaneTheory/react-slingshot by deleted user 7 years ago
- Revert PR #450 (#451) Removed change that removed additional dashes in npm test scripts in favor of adding jest-cli as a devDep. This commit instead focusses on issue 2 from #449 where setupPrompt... — committed to coryhouse/react-slingshot by deleted user 7 years ago
- Issue #449 fix (#450) * Issue #449 fix Issue 1: Removed extra dashes located in the package.json test scripts that cause start script to fail. Issue 2: Removed escape characters found in setu... — committed to coryhouse/react-slingshot by deleted user 7 years ago
- Implement React Router@4.0.0 (#393) * removed react-router form package.json & installed react-router-dom. * completed index.src refactor. * re-implemented App.js * added notes to import ch... — committed to coryhouse/react-slingshot by TobiahRex 7 years ago
- Adds `brew install watchman` troubleshooting tip. Adds fix for the following issue after an initial `npm start -s` https://github.com/coryhouse/react-slingshot/issues/449 — committed to walreyes/react-slingshot by walreyes 6 years ago
- Adds `brew install watchman` troubleshooting tip. (#536) Adds fix for the following issue after an initial `npm start -s` https://github.com/coryhouse/react-slingshot/issues/449 — committed to coryhouse/react-slingshot by walreyes 6 years ago
- Adds `brew install watchman` troubleshooting tip. (#536) Adds fix for the following issue after an initial `npm start -s` https://github.com/coryhouse/react-slingshot/issues/449 — committed to newsum2019/singleshot by newsum2019 6 years ago
- Adds `brew install watchman` troubleshooting tip. (#536) Adds fix for the following issue after an initial `npm start -s` https://github.com/coryhouse/react-slingshot/issues/449 — committed to AMagicHarry/react-slingshot by AMagicHarry 6 years ago
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
watchmanis required / a dependency, but not annotated in your docs. After runningbrew install watchmanthe 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 watchmansolved 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
watchmanresolves this issue for the remaining cases.To install
watchmanrun the following command to install using homebrewbrew install watchmanAlternatively, you can disable
watchmenon jest calls by adding the--no-watchmanflag.@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
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
‘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 startnpm 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
jestto not usewatchmanand update docs to explain that thetestscript can be faster if you installwatchmanand change the settings.