nodejs / snap

Node.js snap source and updater
MIT License
166 stars 38 forks source link

npm doesn't work with sudo #44

Open skarmoutsosv opened 1 year ago

skarmoutsosv commented 1 year ago

$ npm -v 8.19.2

$ node -v v18.10.0

$ which npm /snap/bin/npm

$ which node /snap/bin/node

$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin

$ npm install nodemon up to date, audited 33 packages in 762ms 3 packages are looking for funding run npm fund for details found 0 vulnerabilities

$ sudo npm install -g nodemon sudo: npm: command not found

jpayne commented 1 year ago

I’m having the same issue. Did you ever figure this out?

skarmoutsosv commented 1 year ago

Unfortunately no. I had to use sources other than snap to make it work.