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

Fresh clone gives error when running `npm start` #53

Closed Magneticmagnum closed 7 years ago

Magneticmagnum commented 7 years ago

I'm on a Windows 7 Machine and followed the Readme's commands. Node version: 6.9.1

After npm start I get the following:

$ npm start

relay-fullstack@1.0.0 start c:\dev\relay-fullstack nodemon --watch server/data/*/.js --exec "npm run update && ./node_modules/.bin/babel-node server/index.js"

[nodemon] 1.11.0 [nodemon] to restart at any time, enter rs [nodemon] watching: server/data/*/.js [nodemon] starting npm run update && ./node_modules/.bin/babel-node server/index.js

relay-fullstack@1.0.0 update c:\dev\relay-fullstack babel-node server/utils/updateSchema.js

Schema has been regenerated '.' is not recognized as an internal or external command, operable program or batch file. [nodemon] app crashed - waiting for file changes before starting...

Magneticmagnum commented 7 years ago

Nevermind, I was able to run the start script commands individually...

Magneticmagnum commented 7 years ago

For those reading this, it seems to be a pathing issue with Node and Windows. Try running the npm start commands seperately:

nodemon --watch server/data/**/*.js --exec \"npm run update

./node_modules/.bin/babel-node server/index.js\

Jordan-Hall commented 7 years ago

Just to add to this. It appears its because of the inner string. You could change it to this

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

Then it all works

lvarayut commented 7 years ago

Thanks @Magneticmagnum , @Jordan-Hall for sharing the solutions.

claym commented 7 years ago

Might be a good idea if @Jordan-Hall's fix made it into the code base (I don't have a non-windows machine to test on).

If I wasn't so stubborn I would have just bounced off this error the first time I ran into it :)

lvarayut commented 7 years ago

@claym, it's actually made into the code base 😄

claym commented 7 years ago

Odd, I did a fresh pull this morning and got the error above. Jordan's solution fixed it.

lvarayut commented 7 years ago

Then, if you could test the solution and send a PR, that would be awesome.

claym commented 7 years ago

Done!