Closed mhulse closed 7 years ago
https://stackoverflow.com/a/22492384
Use __filename
over process.argv[1]
?
What about: $(nodenv which npm)
?
See: https://github.com/istanbuljs/nyc/issues/230#issuecomment-209826191
https://github.com/nodenv/nodenv/blob/master/README.md
Maybe just which npm
?
no which, just going to use __filename
.
It's because the
bin.js
does not know where to runnpm start
from.Here's is a possible fix:
Seems slightly hacky though. Need to figure out if this is the best way to call
npm start
from a bin script?