Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behavior with nvm installed #194

Open
kingofsevens opened this issue Jun 25, 2020 · 3 comments
Open

Odd behavior with nvm installed #194

kingofsevens opened this issue Jun 25, 2020 · 3 comments
Labels

Comments

@kingofsevens
Copy link

I am using the git version where #189 merged. And I am also using nvm with .nvrmc in some folders with or without .env in them.

When I cd to a folder with .nvmrc defined with a node version in it and it is different from the default version. I see the below outcome.

~/yyy $ cd dev
Found '/Users/xxx/yyy/dev/.nvmrc' with version <12.18.1>
Now using node v12.18.1 (npm v6.14.5)
shasum: Now using node v10.19.0 (npm v6.13.4): 
autoenv_source:.:6: no such file or directory: Now using node v10.19.0 (npm v6.13.4)
shasum: Reverting to nvm default version: 
autoenv_source:.:6: no such file or directory: Reverting to nvm default version
~/yyy/dev $

Even though I receive the above error, nvm uses the correct version.

~/yyy/dev $ node --version
v12.18.1
~/yyy/dev $ cd ..
Reverting to nvm default version
Now using node v10.19.0 (npm v6.13.4)
~/yyy $ node --version
v10.19.0

And no error reverting to old version when changing to parent folder.

@jadenlemmon
Copy link

Having the same issue 😢

@hyperupcall
Copy link
Owner

hyperupcall commented Apr 8, 2022

Hmm, I just tried to repo, but unfortunately, I did not get the same issue

I have an empty directory with .nvmrc containing v16.0.0, with the default nvm version being v12.18.1. cd'ing into the directory does nothing. I have to use nvm use to actually change the version

$ nvm use
Found '/.../repos/Groups/Bash/autoenv/.hidden/dir/.nvmrc' with version <v16.0.0>
Now using node v16.0.0 (npm v7.10.0)

Is anyone using nvm in a special way? I checked and it seemed that by default, it does not change the node verison when cding. So I'm not sure how you end up getting your error by default - do you define cd or chdir yourself in your ~./bashrc before sourcing nvm or autoenv?

@reintroducing
Copy link

I'm having the same issue. I have nvm automatically loading the defined version of node in my .zshrc file set up. In my .env file of my project i also have source env/bin/activate. This produces the following:

Found '/Users/mprzybylski/Work/patientpattern/.nvmrc' with version <17.9.0>
Now using node v17.9.0 (npm v8.5.5)
shasum: Now using node v16.13.0 (npm v8.1.0): No such file or directory
autoenv_source:.:6: no such file or directory: Now using node v16.13.0 (npm v8.1.0)
shasum: /Users/mprzybylski/Work/patientpattern/.envReverting to nvm default version: No such file or directory
autoenv_source:.:6: no such file or directory: /Users/mprzybylski/Work/patientpattern/.envReverting to nvm default version

Repository owner deleted a comment from tobarbaro Jan 1, 2024
Repository owner deleted a comment from jalamari2018 Jan 11, 2024
Repository owner deleted a comment from apocanow1 Feb 20, 2024
Repository owner deleted a comment from raviikushh Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants
@reintroducing @jadenlemmon @kingofsevens @hyperupcall and others