Comments (5)
Sneaking an export NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules"
at the bottom of use
seems to do the trick (on v0.4.11 at least), though I'm not sure if it's the right thing to do? (At the very least, it probably needs to preserve the user's current value of $NODE_PATH, I'd think)
from nvm.
The behavior of NPM changed drastically when the node_modules functionality went in. Global installation is generally for stuff that has commands. If you want to use a module programmatically, do not do a global installation.
See https://github.com/isaacs/npm/blob/master/doc/faq.md#readme. Start at "How do I install something everywhere?"
Also see http://nodejs.org/docs/v0.5.4/api/modules.html#loading_from_node_modules_Folders
from nvm.
Ah hm, thanks for the tips! I'll go bug some npm folk, then - I went down that rabbit hole due to npm link
sticking my in-dev package into a global node_modules :-/
Closing
from nvm.
Are you using a really old version of NPM? The version should be 1.something I think. It should not be 0.x.
Edit: Doesn't look like you are... npm link should work just fine. Go to a directory and then link whatever you want into it. It will link it to the global folder and then to your current directory. That's what the FAQ means when it says "check out npm link" I think.
from nvm.
I think this may be a special case - I effectively want a self-referential link to the current project
npm link; npm link project-name
did the trick! (Though, it seems a bit awkward)
from nvm.
Related Issues (20)
- nvm ls-remote returns N/A HOT 4
- NVM just will not change version of node HOT 8
- Problems installing/using nvm in AppCenter HOT 2
- Long loading times fixed by better design HOT 1
- [spam]
- NVM problem with corepack and yarn HOT 1
- Curl Error HOT 9
- Error, parse error near `do' when trying to install MacOS HOT 2
- Error when using fetch/axios/node-fetch HOT 1
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash timing Out HOT 3
- [spam]
- `lts/` aliases change with new releases rather than finding the highest local match HOT 3
- Failed to checkout the given version $NVM_VERSION HOT 1
- Allow comments in .nvmrc config file HOT 5
- macOS when install 14 curl: (22) The requested URL returned error: 404 HOT 1
- macOS curl: (22) The requested URL returned error: 404 HOT 1
- nvm installation HOT 1
- Only the latest release of node installed is used despite specifying an earlier version with `nvm use`, when a new terminal tab or session is started. HOT 4
- nvm screws with path leading to warnings on shell startup HOT 12
- Trivy Security scan error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvm.