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

Is it normal that nvm install 10 for the first time takes more than an hour? #1912

Closed
johhansantana opened this issue Sep 19, 2018 · 35 comments
Labels
installing node Issues with installing node/io.js versions. needs followup We need some info or action from whoever filed this issue/PR. OS: ubuntu

Comments

@johhansantana
Copy link

I created a VPS with Ubuntu 14.04 LTS 32bit and after installing nvm via curl I have ran:
nvm install 10 and it's taking a lot longer than usual. These are the logs:

image

It's neverending logging similar things.

I remember this happening once on my personal computer a long time ago when I had ubuntu installed as well but it has never happened again until today.

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

It definitely isn’t normal.

It looks like it’s hanging on the compilation step - is there any chance you copied the .nvm dir from a different machine? If so, try nvm cache clear and try the install again?

If not, then I’m really not sure - presumably the same issue would occur with compiling node downloaded directly from the website.

@ljharb ljharb added OS: ubuntu installing node Issues with installing node/io.js versions. needs followup We need some info or action from whoever filed this issue/PR. labels Sep 19, 2018
@johhansantana
Copy link
Author

After trying nvm cache clear and nvm install 10 I got the same result ( I think )

Here's are the logs:
https://gist.github.com/johhansantana/3f68b41b82811c291bb406bab0b4c3d9

I tried installing V9.x using nvm install 9 and it worked :l

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

It's possible that node v10 isn't compatible with your machine - is it 32 bit or 64 bit? What exact architecture are you on?

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

Also, what gcc version do you have?

@johhansantana
Copy link
Author

It is 32bit.

Not sure what you mean by gcc

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

gcc --version - it's the C compiler. node no longer produces 32 bit binaries as of v10, so you'd have to be able to compile it from source. (32 bit machines are very very ancient)

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

So given that it's compiling, and that it's an old slow machine, and that v9 didn't have to compile, i think it might actually be normal for it to take multiple hours to install.

@ljharb
Copy link
Member

ljharb commented Sep 19, 2018

See nodejs/build#1498 - looks like it's not reliable to be able to use node on 32 bit machines on v10+.

@ashrafulislambd
Copy link

It's not an error. 32 bit binaries are not available. So nvm is compiling it from source. Run it again and wait. It works fine. It compiles and you have to restart. Then you have to type.

nvm use 10.0.0 # or the version you use

@MirroringCode
Copy link

I know this post is really old, but i hope the author or another user could tell me if this issue was solved, because i have the same problem trying to install newer versions of node in my laptop, it just display that same message and i don't know if i should just leave it downloadiing or what else to do.

If the author is seeing this... did it worked? I mean, it installed node after a while? Thanks in advance.

@johhansantana
Copy link
Author

I know this post is really old, but i hope the author or another user could tell me if this issue was solved, because i have the same problem trying to install newer versions of node in my laptop, it just display that same message and i don't know if i should just leave it downloadiing or what else to do.

If the author is seeing this... did it worked? I mean, it installed node after a while? Thanks in advance.

As the comments stated here I believe it worked (can't remember).

@mark-tripney
Copy link

👋 If anyone revisits this: I just downgraded to 15.14.0 via NVM (owing to issues with 16.* on Silicon Macs), and experienced the OP's issue. The install took about 10 minutes, but was, ultimately, fine.

@ljharb
Copy link
Member

ljharb commented Jun 9, 2021

@mtripney ftr, node 16+ is the only one that supports M1 macs natively; everything else uses Rosetta emulation.

@blairbodnar
Copy link

blairbodnar commented Jun 15, 2021

Thanks for noting this @mtripney - Took me about 10 minutes as well installing 12.22.1 via NVM on a new Silicon Mac. I was about to bail out but then saw your comment and waited :)

@mark-tripney
Copy link

@blairbodnar Glad it helped!

@mark-tripney
Copy link

mark-tripney commented Jun 15, 2021

@ljharb You're right, of course, but I’ve had no end of problems with v16, such that I eventually had to downgrade. (One critical example being: vercel/next.js#24564)

@ghost
Copy link

ghost commented Jun 16, 2021

👋 If anyone revisits this: I just downgraded to 15.14.0 via NVM (owing to issues with 16.* on Silicon Macs), and experienced the OP's issue. The install took about 10 minutes, but was, ultimately, fine.

can confirm this. just set up my M1 with v15 and it took quite a bit (enough for me to reach this thread) but was, ultimately, fine.

@EMazzaglia

This comment has been minimized.

@ViliRan
Copy link

ViliRan commented Nov 2, 2021

Can confirm, went to 12.14.1 on a M1 MacBook Pro. Took about 10 minutes, even spun up the fans for the first time ever. But it did finish and is seemingly fine.

@BrianM0330
Copy link

Another confirmation here. M1 MacBook Air on Monterey, downgrading to Node 14 for a project I'm working on and after 10 or so minutes everything finished.

Don't close it out!

@ricardocamacho
Copy link

ricardocamacho commented Dec 1, 2021

I can also confirm it worked for me on Macbook Air M1 chip Monterey, after more than 10 minutes, however, it took about 10 GB of space in disk, is this normal?

@ljharb
Copy link
Member

ljharb commented Dec 1, 2021

@ricardocamacho That's a question to ask node itself; nvm doesn't have any interaction beyond automating the node compilation process.

@Qarun-Qadir-Bissoondial
Copy link

It seems that I previously had nvm installed through Home-brew. I uninstalled it, created a rosetta-specific terminal and installed my node versions from there
Everything worked fine when I did that

@pascalstockert
Copy link

Can confirm that this works on an M2 MacBook as well - just takes a little time, but ultimately the compilation succeeds and v14.18.1 was installed.

@sachinmankotia1991
Copy link

I tried installed version 16 and for me also, it took 20+ mins but in the end , it was done

@IliaZolas
Copy link

IliaZolas commented Aug 21, 2023

took me almost an hour but it finally worked 😅 (Intel macbook pro touch, node v16.20.2)

@ddohcim
Copy link

ddohcim commented Sep 19, 2023

it took about 25 min upgrading from node 16.18.1 to 18.18.0 on my M1 Pro, I also confirm everything went successful

@URobert
Copy link

URobert commented Oct 5, 2023

Can also confirm it took a long time (10min+) on M2. This was installing version 20

@lazysergey
Copy link

I must say this thread is a gem, I was going to interrupt the installer before reading this
my experience - 14.17.0 took around 10min on M2, works completely fine, just grab some coffee and wait

@bashers222
Copy link

Using this method to install NVM10 on my pi2 (which is possible it seems.)
Its still compiling after 6 hours!

@karnatik
Copy link

karnatik commented Mar 2, 2024

Using this method with v20.11.1, more than 6 hours on Pi Zero WH..canceled :(
Trying with v16.20.2 after clearing manually : ~/.nvm/.cache/node-v20.11.1 to free 800Mo :
=> 4hours later :
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:994: /home/user/.nvm/.cache/src/node-v16.20.2/files/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/api/api.o] Error 1
..will try something else so..

@alirezaalavi87

This comment has been minimized.

@gpataciertocom

This comment has been minimized.

@ljharb

This comment has been minimized.

@mikib0

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing node Issues with installing node/io.js versions. needs followup We need some info or action from whoever filed this issue/PR. OS: ubuntu
Projects
None yet
Development

No branches or pull requests