Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm link --global #10113

Closed
dsernst opened this issue Oct 26, 2015 · 4 comments
Closed

npm link --global #10113

dsernst opened this issue Oct 26, 2015 · 4 comments

Comments

@dsernst
Copy link

dsernst commented Oct 26, 2015

Is there a way to use npm link for a module that is meant to be installed globally?

Trying this:

npm link -g npm-run-help

throws this error:

npm ERR! link should never be --global.
npm ERR! Please re-run this command with --local
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

But what if the --global flag was intentional? Why is this not allowed? This line from the npm link man page still applies:

This is handy for installing your own stuff, so that you can work on it and test it iteratively without having to continually rebuild.

@kumavis
Copy link

kumavis commented Aug 19, 2016

Yes, I am also curious why this is forbidden

@legodude17
Copy link
Contributor

npm link will always link the bin of the current project to the npm.prefix. See: #13702. I think it errors because npm link will always do that.

@legodude17
Copy link
Contributor

Though I think it should just ignore the global mode.

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

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

No branches or pull requests

4 participants