Closed totem415 closed 6 years ago
OK, so just to be sure, I tried installing it globally, but it still doesn't work:
root@1upTester:/var/lib/cloud9/MercuryDesign/trunk# npm install node-deb -g --save
/usr/bin/node-deb -> /usr/lib/node_modules/node-deb/node-deb
/usr/lib
└── node-deb@0.10.7
root@1upTester:/var/lib/cloud9/MercuryDesign/trunk# node-deb -v
/usr/bin/node-deb: line 77: jq: command not found
root@1upTester:/var/lib/cloud9/MercuryDesign/trunk# node-deb --help
/usr/bin/node-deb: line 77: jq: command not found
No dice.
For that global example it looks like you just need jq (a json parser) installed. On Debian/Ubuntu you can install it with:
sudo apt-get install jq
As for you first (non-local example), when you install locally (without -g) node-deb is there, just not in your path.
jcv@triforce tmp $ npm install node-deb --save
npm WARN saveError ENOENT: no such file or directory, open '/data/shared/tmp/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/data/shared/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.
+ node-deb@0.10.7
added 1 package from 1 contributor in 0.772s
jcv@triforce tmp $ which node-deb
jcv@triforce tmp $
but it is there:
jcv@triforce tmp $ ls node_modules/.bin/
node-deb
so you can just run it with the full path:
./node_modules/.bin/node-deb
Cool.
Now I can get it responding to commands when installed globally or just locally.
Thanks very much for your help.
-roger
Since this was opened, i there anything I can do to tweak the package so that it's easier to run without the -g
option? Like for projects that want to pin to a version so a dev could have multiple projects that on their machine that have dependencies on different versions of node-deb
. Asking because honestly, I'm not a node
person and this was built when I was doing ops to help out my team with deploys.
I followed your instructions and installed Node-deb on my Beaglebone Black running "Debian GNU/Linux 9 (stretch)" via this command from my Node project's root directory:
Everything appeared to install correctly:
This is the only project on this machine that will use node-deb, so I'm not sweating the global thing.
Once that was all finished, none of the other commands listed in your instructions work. Here's an example:
Do I have to install globally for node-deb to work? Or is something else going on? My apologies if I'm doing something stupid.
Thanks for your help.
-roger