0

I'm having a problem with yeoman on a couple platforms (Mac OS, Ubuntu).

Basically, the conundrum is that yo can never install generators because it tries to use the -g option but it needs root access in order to do that. However, you cannot run sudo yo. I imagine the "update generators" option would probably fail as well.

How do I fix it so I can do everything I need within yo, instead of quitting and manually running sudo npm install -g generator-webapp (e.g.)?

1 Answer 1

1

I was having the same problem in my work laptop with MAC OS, I changed the owner and group of the .npm folder: /Users/eduardoc/.npm, to match my username and group. The -g option worked perfectly after that.

Sign up to request clarification or add additional context in comments.

1 Comment

Is there a reason why npm installs with root as the owner instead of your user, and is it a "Bad Idea" to make this change?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.