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 provide node installed via opkg as follows

    1. opkg install node - this seems to install both node and npm

    2. opkg install nodejs - this seems to install only node and NOT npm
      To get npm in this case, you need to also do:
      opkg install npm

    I would recommend doing the latter (i.e. install packages nodejs and npm separately) since this give you a more up to date version (v4.3.1) whereas doing the former (i.e.install package node only) gives you an earlier version (v0.12.7)

    Hope that helps.



  • @Kit-Bishop

    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!


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.