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

Incorrest version of node getting installed for setup_6.x #673

Closed
sumitsj opened this issue May 24, 2018 · 9 comments
Closed

Incorrest version of node getting installed for setup_6.x #673

sumitsj opened this issue May 24, 2018 · 9 comments

Comments

@sumitsj
Copy link

sumitsj commented May 24, 2018

I was trying to install node version 6.x inside docker using below commands -

RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs

I had also added below line to verify node version and showed me v8.10.0
RUN echo "Node Version $(node --version)"

Where exactly I am getting wrong? or is this an issue?

@sumitsj sumitsj changed the title Incorrest version of node got installed for setup_6.x Incorrest version of node getting installed for setup_6.x May 24, 2018
@chrislea
Copy link
Contributor

What distribution is being used for the Docker image here?

@sumitsj
Copy link
Author

sumitsj commented May 28, 2018

Distribution : Ubuntu
Docker Version: 17.12.0-ce-mac49 (21995)
OS: Mac High Sierra

Dockerfile.txt

@sonicdoe
Copy link
Contributor

You’re probably installing Node.js v8 from the official Ubuntu repositories, see #657. You can run apt policy nodejs to verify which one is installed.

@Apollon77
Copy link

Apollon77 commented Jul 18, 2018

we had several issues from "ioBroker" (nodejs based smart home software) on mainy raspberry and such since last friday/saturday.

Users used the nodesource 6.x install commands and ended up in having node 8 and NO npm!!

Is there anything more known to this?

@chrislea
Copy link
Contributor

Again, as @sonicdoe notes above, please run

apt policy nodejs

and see if our repository is the one you're getting the package from. If there is still confusion about what's happening, please re-open this issue and post the full output of running the installer script as well as apt policy nodejs so we can try and see what's going on.

@Apollon77
Copy link

Ok, the following happens:

When node 6 is installed or should be installed but the os updated the node version in their repo (Ubuntu 18.04 and it seems also raspbian after a apt-get Update/Upgrade) then the Version in the repo is 8.x and then this is used over nodesource repo.

Should an install from your repo not pin the major Version to prevent that? Seems that this was never needed because original repos were always veeeery old ... but now it changed

@chrislea
Copy link
Contributor

The default for apt is just to install the newest version it sees in any repository. If you want to pin an older version than what the default is for your distribution that's up to you, but we're not going to try and admin an end user's machine in that way.

@Apollon77
Copy link

completely understandable :-) thank you for clarification

@sonicdoe
Copy link
Contributor

I can understand not wanting to pin NodeSource’s repository on the user’s machine, however, the current approach might only become more confusing as time goes on and distributions ship newer Node.js versions.

This is complicated by the fact that Ubuntu’s nodejs package does not include npm whereas NodeSource’s does. I can imagine a situation where APT upgrades to a newer version (while also switching repositories) and suddenly the npm command is gone.

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