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

special-case nodemon in scripts.start #577

Closed
SomeKittens opened this issue Jul 4, 2015 · 0 comments
Closed

special-case nodemon in scripts.start #577

SomeKittens opened this issue Jul 4, 2015 · 0 comments

Comments

@SomeKittens
Copy link

I'm a colossal idiot and set my npm start script to:

"start": "DEBUG=nbe NODE_ENV=development nodemon ./bin/www"

Later on, I picked up the project and ran nodemon, knowing it'd pick up whatever was in npm start automatically. You may start laughing now.

While I didn't quite get an infinite loop, I got this strange error:

sh: 1: NODE_ENV=development nodemon ./bin/www: not found
[nodemon] failed to start process, "DEBUG=nbe" exec not found
exception in nodemon killing node
TypeError: Uncaught, unspecified "error" event.
    at TypeError (<anonymous>)
    at emit (events.js:74:15)
    at ChildProcess.<anonymous> (/usr/lib/node_modules/nodemon/lib/monitor/run.js:119:11)
    at ChildProcess.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:820:12)

It took me a bit of looking to realize just how dumb I was.

I propose a special case (to be titled "SomeKittens doesn't know node") where if nodemon is found in npm start, throw an error.

@remy remy closed this as completed in 5e07bfe Sep 19, 2015
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

1 participant