shama / napa

:wine_glass: A helper for installing stuff without a package.json with npm.
MIT License
412 stars 34 forks source link

napa not working ubuntu #76

Closed yasiriqbal776 closed 6 years ago

yasiriqbal776 commented 7 years ago

I have set napa in my package.json and its working fine on my windows setup on my computer but when i set my server on aws ec2 ubuntue machine it does not resolve napa repositories

shama commented 7 years ago

Any error or other information?

mxl commented 6 years ago

I had the same issue. I was running npm install with root privileges, but when npm executes install script it tries to downgrade privileges and fails to install napa packages in current directory because it does not have enough rights to write there. The error message was:

npm WARN lifecycle undefined~install: cannot run in wd %s %s (wd=%s) undefined napa ... /var/www/html

Solutions are:

  1. run npm install without root privileges in directory with correct permission;
  2. run npm install --unsafe-perm which will prevent npm from downgrading privileges.
shama commented 6 years ago

Also here is a good resource installing node/npm without needing sudo: https://gist.github.com/isaacs/579814

Closing this as it works for me.