fullstackreact / react-yelp-clone

Tutorial: Build a Yelp-clone in React
https://www.fullstackreact.com/articles/react-tutorial-cloning-yelp/
MIT License
840 stars 218 forks source link

error with scripts in Windows #15

Closed spdrstar closed 8 years ago

spdrstar commented 8 years ago

Whenever scripts in the package json are executed, ones with NODE_ENV=development or similar will throw an error. In order to fix it, cross-env was made.

If you are using Windows with Cygwin or similar, run the command

npm install -D cross-env

and then change the code in package.json to the following

"scripts": {
"start": "cross-env NODE_ENV=development ./node_modules/.bin/hjs-dev-server",
"test": "cross-env NODE_ENV=test ./node_modules/karma/bin/karma start karma.conf.js",
"test:watch": "npm run test -- --watch"
},

and the commands should work as expected.