lvarayut / relay-fullstack

:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
https://lvarayut.github.io/relay-fullstack/
MIT License
986 stars 126 forks source link

app crashed - waiting for file changes before starting #31

Closed TheoMer closed 8 years ago

TheoMer commented 8 years ago

OS: Windows 10 Pro NPM: 3.9.5

So I:

  1. git clone https://github.com/lvarayut/relay-fullstack.git
  2. cd relay-fullstack
  3. npm install
  4. npm start

and am then issued with the following message:

> relay-fullstack@1.0.0 start C:\Users\Theo\Documents\Visual Studio 2015\Projects\relay-fullstack > nodemon --watch 'server/data/**/*.js' --exec 'npm run update && babel-node server/index.js'

[nodemon] 1.10.0 [nodemon] to restart at any time, enterrs [nodemon] watching: 'server/data/*/.js' [nodemon] starting 'npm run update ''npm' is not recognized as an internal or external command, operable program or batch file. [nodemon] app crashed - waiting for file changes before starting...

What is the issue here?

lvarayut commented 8 years ago

Thanks for the question. The issue seems to be related to your environment setup. Please take a look at this Stack Overflow question.

TheoMer commented 8 years ago

@lvarayut Yes, I have C:\Program Files\nodejs as part of my PATH variable, but that does not resolve the issue. (See image)

I have 4 other projects, all using 'npm start', which all work with no issues. Yours is the only one that fails when running that commenad.

npm path variable

If I run npm run update I get Schema has been regenerated. But if I run npm start, the same error, as mentioned above, occurs. So, why would npm run update work but not npm start?

lvarayut commented 8 years ago

Would this issue be related to your problem?

TheoMer commented 8 years ago

@lvarayut So the solution was to change:

"start": "nodemon --watch 'server/data/**/*.js' --exec 'npm run update && babel-node server/index.js'"

to

"start": "nodemon --watch server/data/**/*.js --exec \"npm run update && babel-node server/index.js\""

You may wish to update the 'Read me' section to notify windows users of this solution, should they experience this issue.

lvarayut commented 8 years ago

Thanks for sharing the solution. I will find the best way to solve the problem.

reinert commented 7 years ago

@TheoMer THANK YOU! Saved my day!

gvortel commented 6 years ago

@TheoMer you are the man! Thank u