This repository has been archived by the owner on Nov 17, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 181
ELIFECYCLE error on npm run dev/prod #40
Comments
Hi @shelakel, thanks! Fluxible-router is coming soon :-) It's a problem setting env vars:
On windows this should work:
Please try and comment with the results 👍 |
Good stuff. It seems that using Command Prompt (cmd.exe) fails to start the webpack development server. Run: cmd.exe /C "set NODE_ENV=development && set DEBUG=isomorphic500 && node index" Only bash works on Windows. I think opting for the webpack/react-starter scripts approach is more feasible in the long run. |
Closed
If you're interested, the following works for me (Windows 8.1). In
Then in index.js I catch/store any flags: var args = require('yargs').argv;
if (args.dev) process.env.NODE_ENV = 'development'; // either catch flags specifically
if (args.DEBUG) {
process.env.DEBUG = args.DEBUG; // or just set whatever's passed in to some flag
}
// Start the server app
require("./src/server"); |
Thanks @davidgilbertson for the suggestion! However i'd go for setting the env vars out of the npm script. |
cameronk
pushed a commit
to cameronk/isomorphic500
that referenced
this issue
Mar 2, 2016
Add NPM commands, `npm run dev-windows` and `npm run prod-windows`, to fix issues gpbl#40 and so on.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I came across this issue running (Git) bash and command prompt on Windows 8.1:
Excerpt from output when running npm run dev:
It looks like it's a problem with npm on Windows, as just running the intended command (NODE_ENV=development DEBUG=isomorphic500 node index) directly in bash works fine.
Just thought I'd provide some feedback concerning the issue I've encountered and the workaround, for reference purposes.
Thanks for the project, it looks well put together! (P.S. Looking forward to fluxible-router integration)
The text was updated successfully, but these errors were encountered: