Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to do npm start on fresh installation #183

Open
t-zander opened this issue Jun 20, 2021 · 1 comment
Open

Unable to do npm start on fresh installation #183

t-zander opened this issue Jun 20, 2021 · 1 comment

Comments

@t-zander
Copy link

Followed the steps listed in Your repo example
https://github.com/relayjs/relay-examples/tree/master/issue-tracker

  1. git clone [email protected]:relayjs/relay-examples.git
  2. cd relay-examples/issue-tracker
  3. npm install
  4. set token
  5. npm start

Getting the following error:

yarn run relay-compiler --schema schema/schema.graphql --src ./src/ $@ --watch
$ /home/t-zander/projects/pet/relay-examples/issue-tracker/node_modules/.bin/relay-compiler --schema schema/schema.graphql --src ./src/ --watch
[relay] Watchman is required to watch for changes. Running with watch mode disabled.
[relay] 
[relay] Writing js
[relay] Unchanged: 12 files
Done in 0.53s.
[relay] yarn run relay --watch exited with code 0
--> Sending SIGTERM to other processes..
[react-scripts] react-scripts start exited with code SIGTERM
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `yarn run relay; concurrently --kill-others --names "react-scripts,relay" "react-scripts start" "yarn run relay --watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /home/t-zander/.npm/_logs/2021-06-20T19_31_53_687Z-debug.log

I am new to this, so I am just lost as it is not clear how to fix it.
I tried to run it separately
npm run relay --watch false --watchman false
npm run start:react which is react-scripts start
It seems to work fine.
So my question is:
How could I fix this to run it as npm start?
Should I install watchman globally in my system?

Why did another example worked just fine? (I mean this one)

@t-zander
Copy link
Author

t-zander commented Jun 20, 2021

Looks like watchman MUST be installed as a package in the system.
So, the solution is to do

sudo apt-get install watchman

Otherwise npm start will not work.
I know it may be obvious, but in my opinion it would be nice to have it stated somewhere in the steps.

Sorry for opening this, but again, maybe it can be added somewher to the docs or at least example repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant