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

nvm.sh is automatically deleted, after install instruction completed #3152

Open
TomZhooooou opened this issue Jul 26, 2023 · 24 comments
Open

Comments

@TomZhooooou
Copy link

TomZhooooou commented Jul 26, 2023

Operating system and version:

macOS 13.4

How did you install nvm?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

What steps did you perform?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

What happened?

nvm.sh is not there and git status showed it was deleted

What did you expect to happen?

Is there anything in any of your profile files that modifies the PATH?

.zshrc

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15037 100 15037 0 0 69402 0 --:--:-- --:--:-- --:--:-- 70596
=> Downloading nvm from git to '/Users/.nvm'
=> Cloning into '/Users/.nvm'...
remote: Enumerating objects: 361, done.
remote: Counting objects: 100% (361/361), done.
remote: Compressing objects: 100% (307/307), done.
remote: Total 361 (delta 40), reused 167 (delta 28), pack-reused 0
Receiving objects: 100% (361/361), 221.43 KiB | 2.99 MiB/s, done.
Resolving deltas: 100% (40/40), done.

  • (HEAD detached at FETCH_HEAD)
    master
    => Compressing and cleaning up git repository

=> Appending nvm source string to /Users.zshrc
=> Appending bash_completion source string to /Users/.zshrc
bash: line 435: /Users/.nvm/nvm.sh: No such file or directory
=> You currently have modules installed globally with npm. These will no
=> longer be linked to the active version of Node when you install a new node
=> with nvm; and they may (depending on how you construct your $PATH)
=> override the binaries of modules installed with nvm:

@ljharb
Copy link
Member

ljharb commented Jul 26, 2023

How could nvm.sh be deleted? Nothing I'm aware of would do that. Can you elaborate?

@TomZhooooou
Copy link
Author

TomZhooooou commented Jul 26, 2023

even after I copied nvm.sh to the directory ~/.nvm/, the nvm.sh file will still disappear after it's shown for a second.

From the installation output generated, you can see that:

......
bash: line 435: /Users/.nvm/nvm.sh: No such file or directory

The nvm.sh is not found by the install.sh

@ljharb
Copy link
Member

ljharb commented Jul 26, 2023

Wait, why /Users/.nvm? there's no user called .nvm, it should be installed in $HOME/.nvm. What's $HOME?

@TomZhooooou
Copy link
Author

That's not an issue, I hided it. $HOME is /Users/[company_name]

@ljharb
Copy link
Member

ljharb commented Jul 26, 2023

ah ok, thanks for clarifying. if you make a new file at $NVM_DIR/nvm.sh, does that vanish too?

@TomZhooooou
Copy link
Author

I just tried that, I am able to create nvm.sh with command like cat > nvm.sh. And I copied and pasted the actual content into it. Now I am able to run install.sh successfully.

@ljharb
Copy link
Member

ljharb commented Jul 26, 2023

That's still confusing; I can't conceive of any command in install.sh or nvm.sh that would affect nvm.sh.

@TomZhooooou
Copy link
Author

Yes, I am confused too. I tried to delete the dir and run the command "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash" couple of times. It remains the same, but if I git clone the repo and then run install.sh it works fine

@aspin
Copy link

aspin commented Jul 27, 2023

Funnily enough I'm getting this too and I have no idea what's causing it. I do a have a dotfiles repo that I run setup from, but I just cannot make this work...I tried various ways of creating and recreating this file, but it just keeps getting deleted

@ljharb
Copy link
Member

ljharb commented Jul 27, 2023

@aspin same mac OS version?

@aspin
Copy link

aspin commented Jul 27, 2023

I guess there's some possibility that my new work laptop is causing this? I cannot paste the contents of nvm.sh into a file at all, and any file with its contents just gets auto deleted.

 ✘  aspin@macbook-R2GLXYJWXP  ~  ls
Desktop/    Documents/  Downloads/  Library/    Movies/     Music/      Pictures/   Public/     dotfiles/   virtualenv/ workspace/
 aspin@macbook-R2GLXYJWXP  ~  pbpaste > foo
 aspin@macbook-R2GLXYJWXP  ~  ls
Desktop/    Documents/  Downloads/  Library/    Movies/     Music/      Pictures/   Public/     dotfiles/   foo         virtualenv/ workspace/
 aspin@macbook-R2GLXYJWXP  ~  ls
Desktop/    Documents/  Downloads/  Library/    Movies/     Music/      Pictures/   Public/     dotfiles/   foo         virtualenv/ workspace/
 ✘  aspin@macbook-R2GLXYJWXP  ~  cp foo foo.sh
 aspin@macbook-R2GLXYJWXP  ~  ls
Desktop/    Documents/  Downloads/  Library/    Movies/     Music/      Pictures/   Public/     dotfiles/   foo         virtualenv/ workspace/

@aspin
Copy link

aspin commented Jul 27, 2023

@ljharb 13.2.1

Tried on my old 12.4 macbook and it works fine.

@ljharb
Copy link
Member

ljharb commented Jul 27, 2023

Do you have any kind of "antivirus" or corporate spyware installed? Normally these things aren't needed on a Mac, but perhaps it's misidentifying some part of the file as harmful and deleting it.

@aspin
Copy link

aspin commented Jul 27, 2023

Yep, looks like it. Have something called Sentinel One that's picking this file up bleh

@ljharb
Copy link
Member

ljharb commented Jul 27, 2023

@TomZhooooou do you have "Sentinel One" installed as well?

@aspin do you have any links to where I could report the problem with them?

@aspin
Copy link

aspin commented Jul 27, 2023

will have to let you know later...i haven't actually started work at this place yet so I don't have all the IT contact points I need to figure this out

@aspin
Copy link

aspin commented Jul 27, 2023

well, the issue just fixed itself for me. dunno what's up or if it'll fail again in the future 🤦

@TomZhooooou
Copy link
Author

@TomZhooooou do you have "Sentinel One" installed as well?

@aspin do you have any links to where I could report the problem with them?

Yes, I have "Sentinel One" installed in my work laptop, seems like this is the cause

@ljharb
Copy link
Member

ljharb commented Jul 27, 2023

@TomZhooooou do you have any links for that product, so i can report to them that it's broken?

@charlesbthomas
Copy link

This is also happening to me. Reverting back to 0.38.0 fixed it for me.

@ljharb
Copy link
Member

ljharb commented Sep 7, 2023

@charlesbthomas do you also use Sentinel One?

@charlesbthomas
Copy link

@charlesbthomas do you also use Sentinel One?

Looks like it. This is a new workstation.

@ljharb
Copy link
Member

ljharb commented Sep 7, 2023

Can you provide some contact mechanism for it, so i can report the bug?

@ljharb
Copy link
Member

ljharb commented Jun 10, 2024

ping @DorWeiss - any chance you could connect me to the right person at Sentinel One to address this?

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

No branches or pull requests

4 participants