sanathkr / go-npm

Distribute and install Go binaries via NPM
Apache License 2.0
171 stars 56 forks source link

Add helpful messaging when sudo npm install fails #2

Open sanathkr opened 7 years ago

sanathkr commented 7 years ago

See https://github.com/awslabs/aws-sam-local/issues/66

If you had installed npm using sudo, then the bin directories where go-npm tries to install the binaries are owned by root. We get EACCESS when trying to move the file from ./bin to npm bin directory.

Catch the error and provide helpful instructions. Link to https://docs.npmjs.com/getting-started/fixing-npm-permissions

dm-grinko commented 7 years ago

@sanathkr https://docs.npmjs.com/getting-started/fixing-npm-permissions doesn't help. any suggestions?