0

I have a package.json which includes a "bin": "./bin/myexecutable" declaration.

After running npm install from within that same folder I can do this $ myexecutable and myexectubale runs.

myexecutable is only available when I am in that directory, and not any subdirectories. I use oh-my-zsh normally but the same behaviour happens if I use bash. My $PATH variable does not include the binary.

How is myexecutable automatically made available to the shell after npm install?

Dan
  • 2,830
  • 19
  • 37
  • And there you have it! `:node_modules/.bin:` – Dan May 19 '16 at 03:50
  • Does installing node add this to the path? – Dan May 19 '16 at 03:50
  • Maybe. There are so many ways to install node. Some of them probably alters PATH – Alexey Ten May 19 '16 at 03:54
  • Having a look around, it seems not. There is [also a better to way to do that](http://stackoverflow.com/questions/9679932/how-to-use-package-installed-locally-in-node-modules). Turns out this was a dud question. Thanks for your help. (Do I delete questions like this?) – Dan May 19 '16 at 03:56

0 Answers0