Comments (10)
Man I had the same happen to me. The src folder and my versions of node are all showing up in my home folder rather than under ~/.nvm what gives?
from nvm.
Not to be a necromancer but has anyone figured out why this is happening?
from nvm.
@sheldonkwok I don't know much about bash at the moment so I'm not sure why this happens, but the $NVM_DIR
variable in ~/.nvm/nvm.sh
is always set to the home directory, so when it gets to the [ ! -d "$NVM_DIR" ]
check it just skips over it.
I fixed it simply by removing the [ ! -d "$NVM_DIR" ]
check on line 18 of the nvm.sh
file.
from nvm.
I forced NVM_DIR to be correct in my .bash_profile before I source NVM:
# nvm
NVM_DIR=~/.nvm; export NVM_DIR
. ~/.nvm/nvm.sh
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion
from nvm.
@nicholascloud works for me, thanks a lot.
from nvm.
I removed the check on line 18 like @jakelucas pointed out, it's not the best solution but it worked for me.
from nvm.
I also had the same problem, but it's the first time in a year of using NVM that I've encountered it.
It seems that for some reason NVM_DIR was defined as my home directory, but after restarting it was gone. I couldn't determine any obvious reason for it being set.
I've not been able to replicate the issue. Anyone have an idea of how I could replicate it?
from nvm.
I also got this issue. I presumed that BASH_SOURCE[0] didn't evaluate correctly within the context of the login.
This is a duplicate of #268 (BASH_SOURCE makes no sense to dash, which is the shell that reads ~/.profile, and which sources nvm.sh)
from nvm.
Is this still a problem with v0.5.1 of nvm
?
from nvm.
Please reopen if this is still an issue in the latest tagged release (currently v0.10.0
)
from nvm.
Related Issues (20)
- Fail to install with `install.sh` script HOT 5
- install-latest-npm does not work for node>=v14.17 HOT 1
- Potential 0.40.0 regression on Github Actions runners HOT 21
- unable to install nvm HOT 16
- [spam]
- Action Required: Fix Renovate Configuration HOT 7
- On Windows11, how to install nvm in Users profile? HOT 5
- zsh initialization performance HOT 3
- Version 0.40.0, command `nvm install` fails when `$NVM_DIR` path contains spaces HOT 2
- nvm installs node binary for armv7l instead of arm64 HOT 12
- Trash-put involving on nvm usage HOT 2
- [spam]
- `nvm_resolve_local_alias default` has bad performance
- uppercase in .nvmrc are handled differently for `use` and `install` commands HOT 6
- Is the download path of nodejs changed? HOT 2
- Operation not permitted after installed nodejs HOT 6
- What is the portable way of using NVM's node in Makefiles HOT 3
- [spam]
- [spam]
- Nvm slow down Msys2
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.