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

Command relay not found #126

Open
Kajmeh opened this issue Dec 6, 2019 · 9 comments
Open

Command relay not found #126

Kajmeh opened this issue Dec 6, 2019 · 9 comments

Comments

@Kajmeh
Copy link

Kajmeh commented Dec 6, 2019

Followed the instruction and getting error command "relay;" not found.

@renanmav
Copy link

renanmav commented Dec 6, 2019

"relay;" with the ";"?

Try yarn relay or npm run relay

@jstejada
Copy link
Contributor

jstejada commented Dec 6, 2019

@Kajmeh which instructions exactly did you follow?

@Kajmeh
Copy link
Author

Kajmeh commented Dec 6, 2019

@renanmav it didn't work with yarn relay. still throwing error:
D:\repo\relay\relay-examples\issue-tracker>npm start

[email protected] start D:\repo\relay\relay-examples\issue-tracker
yarn run relay; concurrently --kill-others --names "react-scripts,relay" "react-scripts start" "yarn run relay --watch"

yarn run v1.17.3
warning ....\package.json: No license field
error Command "relay;" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
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! C:\Users\jj\AppData\Roaming\npm-cache_logs\2019-12-06T20_01_54_459Z-debug.log

@Kajmeh
Copy link
Author

Kajmeh commented Dec 6, 2019

@jstejada I went through instructions in this page:[( https://github.com/relayjs/relay-examples/tree/master/issue-tracker)]

First, clone the app:

git clone [email protected]:relayjs/relay-examples.git
Change into the app's directory:

cd relay-examples/issue-tracker
Install the app's dependencies:

npm users:

npm install

yarn users:

yarn
Get your GitHub authentication token in order to let the app query GitHub's public GraphQL API:

Open https://github.com/settings/tokens.

Ensure that at least the repo scope is selected.

Generate the token

Create a file ./relay-examples/issue-tracker/.env.local and add the following contents (substitute for your authentication token):

issue-tracker/.env.local

REACT_APP_GITHUB_AUTH_TOKEN=
Now you're ready to run the app!

@renanmav
Copy link

renanmav commented Dec 6, 2019

Could you Copy&Past here the script section of issue-tracker package.json @Kajmeh?

@Kajmeh
Copy link
Author

Kajmeh commented Dec 7, 2019

@renanmav here you are:

"scripts": {
    "start": "yarn run relay; concurrently --kill-others --names \"react-scripts,relay\" \"react-scripts start\" \"yarn run relay --watch\"",
    "build": "yarn run relay && react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "update-schema": "get-graphql-schema -h \"Authorization=bearer $REACT_APP_GITHUB_AUTH_TOKEN\" https://api.github.com/graphql > schema/schema.graphql",
    "relay": "yarn run relay-compiler --schema schema/schema.graphql --src ./src/ $@"
  },

@renanmav
Copy link

renanmav commented Dec 7, 2019

Make your start script as follows:

"start": "yarn run relay && concurrently --kill-others --names \"react-scripts,relay\" \"react-scripts start\" \"yarn run relay --watch\"",

or

"start": "concurrently --kill-others --names \"react-scripts,relay\" \"react-scripts start\" \"yarn run relay --watch\"",

@elena-ciobanu
Copy link

updating start script made it work for me. Had same issue as you

"start": "concurrently --kill-others --names \"react-scripts,relay\" \"react-scripts start\""

@earvinLi
Copy link

updating start script made it work for me. Had same issue as you

"start": "concurrently --kill-others --names \"react-scripts,relay\" \"react-scripts start\""

Thanks so much for the solution. But could you please help with one more question? So with this solution we delete yarn run relay --watch and everything works, does this mean we don't need watchman anymore or it's just the script and we still have watchman working?

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

5 participants