NPM not found
-
Hi,
I'm new to onion. I have successfully added a USB drive and downloaded node.js (verified with node -v). However when I type npm, I'm getting that onion can't find it. Any ideas?I did some searching and couldn't find anything.
Thank you in advance!
-
@John Shields How did you install node.js?
I have discovered that there are 2 packages that providenode
installed viaopkg
as follows-
opkg install node
- this seems to install bothnode
andnpm
-
opkg install nodejs
- this seems to install onlynode
and NOTnpm
To getnpm
in this case, you need to also do:
opkg install npm
I would recommend doing the latter (i.e. install packages
nodejs
andnpm
separately) since this give you a more up to date version (v4.3.1) whereas doing the former (i.e.install packagenode
only) gives you an earlier version (v0.12.7)Hope that helps.
-
-
Hi!
I believe I did opkg install nodejs as I'm at version 4.3.1 when I do node -v.I did try to do opkg npm but I believe the package was not found or there was a module error.
I'll try again as I'm clearly fussy on it and post back.
-
Ok. I knew it was probably something simple. I did an opkg update then ran the install of npm and that worked.
Thank you!