Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strider need root to install #650

Closed
prune998 opened this issue Nov 26, 2014 · 7 comments
Closed

strider need root to install #650

prune998 opened this issue Nov 26, 2014 · 7 comments
Labels

Comments

@prune998
Copy link

this is a follow up of issue #606

I did everything exposed to install strider as a non root user, without any luck :

strider@build-01:/opt/data/src/strider$ npm install -g strider
npm http GET https://registry.npmjs.org/strider
npm http 200 https://registry.npmjs.org/strider
npm http GET https://registry.npmjs.org/strider/-/strider-1.5.0.tgz
npm http 200 https://registry.npmjs.org/strider/-/strider-1.5.0.tgz
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/strider',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack:
npm ERR!    [ '/usr/lib/nodejs/fstream/lib/writer.js:171:23',
npm ERR!      '/usr/lib/nodejs/mkdirp/index.js:37:53',
npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

how to install strider in a self contained directory, not needing root access at all ?

@knownasilya
Copy link
Member

@prune998 that's an issue with your OS. Google "[my-os-here] node sudo".

The alternative is to not install with npm, and just do a git clone of this repository.

@knownasilya
Copy link
Member

Closing since this isn't a strider issue, but OS level. Feel free to continue discussion 👍

@bitwit
Copy link
Member

bitwit commented Nov 26, 2014

I had this issue setting up strider on a fresh ubuntu build

sudo chown -R $USER /usr/local would make sure the current user has adequate ownership of global node modules to not require sudo

Not sure if there's a downside to this, but that's what Googling got me several months ago. It's also very important not to run Strider as sudo in order for bower not to complain.

@prune998
Copy link
Author

@bitwit this is the WORST thing you can do on your OS.
Point is, people doing dev ops are usualy neither good in dev or ops (don't take it personal).
/usr/local is not meant to be own by a regular user, may it be the user of the only software running on the server.
It may be great in a VM on your laptop for testing purpose, not in production.

After some research, it seems the right way to do it is :

npm config set prefix ~/npm

Then, everything is installed in ~/npm and not /usr/local

@prune998
Copy link
Author

@knownasilya I don't think it's a OS related issue. It is a nodejs and documentation issue :)

@bitwit
Copy link
Member

bitwit commented Nov 27, 2014

@prune998 No offense taken. I'm a good at dev, but learning at ops and would rather put myself out there and be corrected :) Thank you clarification.

@knownasilya
Copy link
Member

@prune998 yes you are right, globals shouldn't be installed there by default. Thanks for finding the right answer 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants