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

the Environment variables Issues with node & npm #177

Closed
2 tasks
kissshot opened this issue Jun 17, 2016 · 12 comments
Closed
2 tasks

the Environment variables Issues with node & npm #177

kissshot opened this issue Jun 17, 2016 · 12 comments

Comments

@kissshot
Copy link

kissshot commented Jun 17, 2016

My Environment

  • Windows 10
  • My Windows installation is non-English.

C:\Users\kissshot>nvm use 4.4.5
Now using node v4.4.5 (64-bit)

nvm is run

then
C:\Users\kissshot>npm -v
'npm' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Users\kissshot>node -v
'node' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

this mean not found node & npm

my English is not good, hope you can understand

i fixed this , delete c:/program files/nodejs

@millylee
Copy link

+1

@coreybutler
Copy link
Owner

Just saw this... did it work after restarting the terminal?

@coreybutler
Copy link
Owner

I've just released a new version (1.1.1). Can you let me know if this is fixed for you?

@levilime
Copy link

levilime commented Jul 8, 2016

I was using (1.1.1) and used the installer and the same problem arised on windows 10. Deleting c:/program files/nodejs as @kissshot suggested then opening a new terminal and doing nvm on fixed the problem for me.

@Almusamim
Copy link

Got same issue here.. When i type: nvm use [arch] I get user control window poping up twice asking if i want to run node

and it fails when i try it in the command line

C:\Users\Hadi>nvm install 4 64
4.0.0
Downloading node.js version 4.0.0 (64-bit)... Complete
Creating C:\Users\Hadi\AppData\Roaming\nvm\temp

Downloading npm version 2.14.2... Complete
Installing npm v2.14.2...

Installation complete. If you want to use this version, type

nvm use 4.0.0

C:\Users\Hadi>nvm list

    4.0.0

C:\Users\Hadi>nvm use 4 64
4.0.0
Now using node v4.0.0 (64-bit)

C:\Users\Hadi>node -v
'node' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Hadi>npm -v
'npm' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Hadi>nvm use 4 64
4.0.0
Now using node v4.0.0 (64-bit)

C:\Users\Hadi>npm -v
'npm' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Hadi>nvm on
nvm enabled
Now using node v4.0.0 (64-bit)

C:\Users\Hadi>node -v
'node' is not recognized as an internal or external command,
operable program or batch file.

@coreybutler
Copy link
Owner

@Almusamim - if you're getting the double prompt, it means you're running with an account that does not have administrative and elevated permissions.

@robertmirro
Copy link

I seem to be having a similar issue...

I've installed NVM 1.1.1 on Win7 Pro from the GIT 2.9.2 bash shell using "Run as administrator" and then installed the 64-bit versions of node 4.4.7 and latest (6.3.1).

I then closed that bash shell, opened another one using "Run as administrator" and attempted to use 4.4.7:

RMirro ~
$ nvm version
1.1.1

RMirro ~
$ nvm list

    6.3.1
    4.4.7

RMirro ~
$ nvm use 4.4.7
Now using node v4.4.7 (64-bit)

RMirro ~
$ nvm list

    6.3.1
    4.4.7

RMirro ~
$ node -v
bash: node: command not found

Any ideas what I'm doing wrong?

@robertmirro
Copy link

robertmirro commented Aug 9, 2016

I've resolved this issue but am not certain which step is responsible for my newly found success. 😜

My initial attempt above involved uninstalling node before installing nvm, however I didn't also delete "C:\Users\ <username> \AppData\Roaming\npm". I'm guessing that might be the culprit.

I was able to use robocopy to delete that npm folder because rimraf wasn't an option (node was uninstalled).

@coreybutler
Copy link
Owner

Win7 isn't officially supported (read why here), nor is the git bash prompt. Cygwin and anything based off it or it's underlying technologies, or other shell interpretors, typically replace the symlink functionality of the native OS. Another user mentioned success with the latest git bash prompt... I suspect the new version has support for mklink, which is the underlying command used in NVM-Windows to create symlinks.... but I haven't explored those shells to find out.

@hybridview
Copy link

Just a note in case others had my issue or it helps devs troubleshoot. When I ran a command prompt by right-clicking on a folder and choosing "Open Command Prompt", Node and NPM were unavailable and could not be located by using the "where" command.
When I opened a command line by just clicking the shortcut in start menu, Node and NPM could be used and located without issue. Now, I just open a command prompt through start menu shortcut and use "cd" to get to the directory I want. Not ideal, but it doesn't take too much extra effort in my case. I am running Windows Server 2012 R2.

@johhor
Copy link

johhor commented Sep 9, 2017

Using version 1.1.6, I had the same issue after running the command "nvm install 7.4.0 64".
I got it to work by manually running the command "nvm use 7.4.0" right after.

@coreybutler
Copy link
Owner

Resolved in v1.1.7.

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

8 participants