Nvm: Support question on how to support nvm in shebang line

Created on 23 Nov 2016  路  2Comments  路  Source: nvm-sh/nvm

This works on MacOS

#!/usr/bin/env node --inspect

but not on Linux. The error on Linux is:

/usr/bin/env: node --inspect: No such file or directory

This error is explained by:

https://bbs.archlinux.org/viewtopic.php?id=168479
http://stackoverflow.com/questions/24548733/how-to-make-a-nodejs-file-executable-with-harmony-option

Now, I need to support different installation locations of Node on a user's machine.

Any idea how I can support this, while also being able to pass different flags to node, like this

#!/usr/bin/env node --inspect

Please advise, thanks!

non-issue / invalid

Most helpful comment

LOL sorry I have no idea why I asked NVM this question

All 2 comments

try #!/usr/bin/env node -- --inspect.

This isn't an nvm issue or question, so I'm going to close it, but feel free to keep responding here.

LOL sorry I have no idea why I asked NVM this question

Was this page helpful?
0 / 5 - 0 ratings