Check Node -v version in ubuntu
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
why is the following happening for me? :
$ node -v
v 10.15.3
$ sudo node -v
v 11.12.0
I am on Ubuntu.
nodejs
add a comment |
why is the following happening for me? :
$ node -v
v 10.15.3
$ sudo node -v
v 11.12.0
I am on Ubuntu.
nodejs
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45
add a comment |
why is the following happening for me? :
$ node -v
v 10.15.3
$ sudo node -v
v 11.12.0
I am on Ubuntu.
nodejs
why is the following happening for me? :
$ node -v
v 10.15.3
$ sudo node -v
v 11.12.0
I am on Ubuntu.
nodejs
nodejs
edited Mar 26 at 12:15
tatsu
675734
675734
asked Mar 26 at 9:46
Y.P VENKYY.P VENKY
31
31
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45
add a comment |
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45
add a comment |
1 Answer
1
active
oldest
votes
Firstable you have to check the path for both command:
$ which node
$ sudo which node
And you will find where the commands are executed. I think that you will see two different folders.
It happens when you install a new version over the old one from a different source, especially for NodeJS. The npm package also will show you different versions.
I would suggest you remove it completely by executing.
apt purge nodejs
Check whether you have some files left of NodeJS and npm after the removal and clean it. At the end install it again:
apt install nodejs
And enjoy it.
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128782%2fcheck-node-v-version-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Firstable you have to check the path for both command:
$ which node
$ sudo which node
And you will find where the commands are executed. I think that you will see two different folders.
It happens when you install a new version over the old one from a different source, especially for NodeJS. The npm package also will show you different versions.
I would suggest you remove it completely by executing.
apt purge nodejs
Check whether you have some files left of NodeJS and npm after the removal and clean it. At the end install it again:
apt install nodejs
And enjoy it.
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
add a comment |
Firstable you have to check the path for both command:
$ which node
$ sudo which node
And you will find where the commands are executed. I think that you will see two different folders.
It happens when you install a new version over the old one from a different source, especially for NodeJS. The npm package also will show you different versions.
I would suggest you remove it completely by executing.
apt purge nodejs
Check whether you have some files left of NodeJS and npm after the removal and clean it. At the end install it again:
apt install nodejs
And enjoy it.
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
add a comment |
Firstable you have to check the path for both command:
$ which node
$ sudo which node
And you will find where the commands are executed. I think that you will see two different folders.
It happens when you install a new version over the old one from a different source, especially for NodeJS. The npm package also will show you different versions.
I would suggest you remove it completely by executing.
apt purge nodejs
Check whether you have some files left of NodeJS and npm after the removal and clean it. At the end install it again:
apt install nodejs
And enjoy it.
Firstable you have to check the path for both command:
$ which node
$ sudo which node
And you will find where the commands are executed. I think that you will see two different folders.
It happens when you install a new version over the old one from a different source, especially for NodeJS. The npm package also will show you different versions.
I would suggest you remove it completely by executing.
apt purge nodejs
Check whether you have some files left of NodeJS and npm after the removal and clean it. At the end install it again:
apt install nodejs
And enjoy it.
answered Mar 26 at 12:57
StefanStefan
893
893
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
add a comment |
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
Thank you Stefan it's working
– Y.P VENKY
Mar 27 at 5:48
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128782%2fcheck-node-v-version-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
would you mind adding some information to your question? like what commands did you run to install node, is this your PC or do you simply have a user on this pc but are not admin? this sort of information. Also the ubuntu version.
– tatsu
Mar 26 at 12:29
in addition to node version also pay attention to the environment variable NODE_PATH which determines where your npm installed modules live ... possibly you may want to create a shell wrapper to setup such variables then execute that wrapper ... also its good to avoid running node as root if possible - welcome to the forum
– Scott Stensland
Mar 26 at 13:45