I have created a simple CLI tool what I want users to install and have commands available while the user is cd'd into a project. Let me describe:
-
Inside my
cli-toolsproject, the package defines the following:{ "bin": { "foo-script": "./bin/foo-script" } } -
User installs script (directly from github at the moment, it's a private tool):
npm install git+https://...../cli-tools --save -
At this point, if the user types
which foo-script, they see:node_modules/.bin/foo-scriptMost user have
./node_modules/.binas part of their $PATH -
Upon executing
foo-script, the following complain arises:/Users/meee/.nvm/versions/node/v6.10.0/bin/pg-util: No such file or directory
Sooo, how can I get users to install my script using npm, and have the commands listed under "bin" directly available? Thanks?
via Ryan Wheale
No comments:
Post a Comment