OS X Mavericks npm file owner #4568

Closed
ecuk opened this Issue Jan 29, 2014 · 4 comments

Projects

None yet

4 participants

@ecuk
ecuk commented Jan 29, 2014

As noted by others (issues #4559, #4560, #4562) npm v1.3.25 is not working on OS X Mavericks. I have had problems since downloading and installing node v0.10.25.

I tried npm cache clean; no luck. Since the error message I was receiving (and which is very similar to those posted in the other related issues, so I have not repeated it here) reports EACCES problems when unlinking files in /usr/local/lib/node_modules/npm/, I looked there to see what was going on. Most of the files are owned by a non-existent UID of 24561. All other files below /usr/local/lib/node_modules/ are owned by me, as I would expect. Only the files below npm/ are owned by this otherwise unknown UID of 24561.

After using sudo chown -R to change all the files to have me as owner, npm update -g worked without error.

It seems an unlikely error, but Is it possible that the process of npm upgrading itself to v1.3.25—which seems to be what is going on when the error happens—is somehow setting this UID on the npm files before then trying to unlink them?

@nanashiRei

You temp fix this by addin chmod + s on /var/lib/node_modules and ~/.npm

@ecuk
ecuk commented Jan 29, 2014

Apologies if my original post wasn't clear. I know a variety of ways that one could temporarily fix the problem I mentioned: Presumably it is a permanent solution which is sought. I was simply providing evidence that might (or might not) be useful in tracking down whatever changed recently that has caused problems with npm on Mavericks.

Since none of the several other open issues about the Mavericks problem mentioned UIDs, I thought it worth mentioning. Of course, it could be a red herring.

@frankadrian

Do you guys happen to be using nvm (node version manager)?

I have the same problem when using npm installed via nvm. But with the package downloaded from nodes webpage it works.

@othiym23
Collaborator

Closing as resolved – we've made a few tweaks to the permissions-handling code in the versions of npm leading up to npm@2.0.0, and I'm sure there were other changes in early versions of 1.4. I personally have never seen the behavior described, and I do all of my development all day every day on OS X Mavericks.

@othiym23 othiym23 closed this Sep 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment