Git Product home page Git Product logo

nvm-windows's Issues

'npm link' issue with yeoman generator

Hello,

I was trying to use latest version of yeoman jhipster generator, this implies to run 'npm link' in the generator source directory, everything seems to work fine (link has been created) but it fails when I try to use it.

It works well when not using nvm.

Here is how to reproduce the error with Node 0.10.35 on Windows 7 64bit

git clone https://github.com/jhipster/generator-jhipster.git
cd generator-jhipster
npm link

npm install -g yo
yo jhipster
Error jhipster

You don't seem to have a generator with the name jhipster installed.
You can see available generators with npm search yeoman-generator and then insta
ll them with npm install [name].
To see the 0 registered generators run yo with the `--help` option.

Bug when choosing custom install location

When I select an install location fro nvm other than c:\users{user}\AppData\Roaming\nvm the CLI crashes with:

unable to find c:\users\{user}\AppData\Roaming\nvm\settings.txt

Add environment integrity check

To prevent confusion (see issue #24) and provide direction, there should be an environment integrity check, such as nvm check, complete with autofixes (whenever possible).

can't install certain versions of nodejs

I'm on windows 8.1. When I tried to install a fairly old version of node, I ran into this:
image
As I checked, 0.8.28 is in the list. And it seems that version 0.9.x and older ones are all unavailable now. But 0.12.0 and 0.10.x are installed properly.

CygWin is an unspecified prerequisite

It might help newbies like me save some time if it is stated that something like CygWin tools are needed in order to run npm, which I discovered is a shell script which cannot be run from cmd.exe as far as I can tell.

Issue with setting node version

I have installed nvm under the path:
C:/Program Files/nvm

After installing I ran the following command to install latest version of node:
nvm install latest all

I then ran the following command to set the node version I wanted to use:
nvm use v0.10.34

It showed the following error message
error

From the error message I think the issue is that the file path to nvm/node contains space i.e. the space in the between "Program Files" of the file path where I have installed them.

Running the following command also threw a similar error:
error1

I presume the file paths cannot handle spaces between them. A simple fix on this would be great.

common global modules

I use version A and install a package (say coffeelint) globally. Then I switch to version B. The previously installed package (coffeelint) is not available with version B. So I Need to install it all over again.

C:\> nvm use 0.10.33
C:\> npm install -g coffeelint
C:\> coffeelint -v
1.6.1
C:\> nvm use 0.10.32
C:\> coffeelint -v
'coffeelint' is not recognized as an internal or external command,
operable program or batch file.

Without nvm, npm installs global packages to C:\Users\[username]\AppData\Roaming\npm. But with nvm, it install in C:\Users\[username]\AppData\Roaming\nvm\[version]\npm_modules.

Is there a way to change this behaviour?

Issue with blank spaces in path

Hello! I'm having a problem when i'm trying nvm use <node_version>
captura
Sorry for the spanish language in screenshot. It means "c:\Users\Edu" is not recognise as an internal command... bla bla bla.
My user name is "Edu Martin" and my path is "c:\Users\Edu Martin\AppData\Roaming\nvm"
Is it possible to be an error with black spaces in the path?? All settings in my app are standard

nvm use not work

video -> http://www.youtube.com/watch?v=L9rSo6e32yM

C:\Windows\system32>nvm

Running version 1.0.6.

Usage:

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  nvm install <version> [arch] : The version can be a node.js version or "latest" for the latest stable version.
                                 Optionally specify whether to install the 32 or 64 bit version (defaults to system arch).
                                 Set [arch] to "all" to install 32 AND 64 bit versions.
  nvm list [available]         : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls.
  nvm on                       : Enable node.js version management.
  nvm off                      : Disable node.js version management.
  nvm proxy [url]              : Set a proxy to use for downloads. Leave [url] b lank to see the current proxy.
                                 Set [url] to "none" to remove the proxy.
  nvm uninstall <version>      : The version must be a specific version.
  nvm use [version] [arch]     : Switch to use the specified version. Optionally specify 32/64bit architecture.
  nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode.
  nvm root [path]              : Set the directory where nvm should store different versions of node.js. If <path> is not set, the current root will bedisplayed.
  nvm version                  : Displays the current running version of nvm for Windows. Aliased as v.


C:\Windows\system32>nvm list

    0.11.14
    0.11.11
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>nvm use 0.11.11
Now using node v0.11.11 (64-bit)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>nvm install 0.11.11 64
Version 0.11.11 is already installed.

C:\Windows\system32>nvm install 0.11.11 32
Downloading node.js version 0.11.11 (32-bit)...
C:\Windows\system32>nvm install 0.10.33
Downloading node.js version 0.10.33 (64-bit)... Complete

Could not retrieve https://raw.githubusercontent.com/coreybutler/nodedistro/mast
er/nodeversions.json.


Get https://raw.githubusercontent.com/coreybutler/nodedistro/master/nodeversions
.json: EOF
C:\Windows\system32>nvm list

    0.11.14
    0.11.11
    0.10.33
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>nvm install 0.10.33 32
Downloading node.js version 0.10.33 (32-bit)... Complete
Downloading npm version 1.4.28... Complete
Installing npm v1.4.28...

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

nvm use 0.10.33

C:\Windows\system32>nvm list

    0.11.14
    0.11.11
    0.10.33
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>nvm use 0.10.33
Now using node v0.10.33 (64-bit)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>

when install in another partition npm is not working

when i install the nvm in d:\nvm
and use nvm install latest 32 to install node
it seems npm is not installed properly
the node_modules under the latest installed node is empty
i view the code, and the problem seem to be
this line in nvm.go:

os.Rename(os.TempDir()+"\\nvm-npm\\npm-"+npmv,env.root+"\\v"+version+"\\node_modules\\npm")

it seems using os.Rename to rename directories between different partitions is not working properly
issue #24 may be related

Chocolatey Package

NVM is awesome, saves my time, another program I use is chocolatey, with this package manager you can install easily windows programs.

I wish register nvm in chocolatey but I need the permission to do this.

Windows Server Core Support

Installer fails on Windows Server Core with error: 1060.

I feel that nvm support for server-core is important for real-world use and testing.
Maybe nvm should not use an installer, but a portable executable instead?

Refusing to delete global module

Per @vkbansal (moved from issue #26):

I keep getting Error: Refusing to delete: C:\Program Files\nodejs\coffeelint.cmd not in C:\Program Files\nodejs. when I do npm install -g coffeelint. Any idea what may cause this ?

Here's npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'coffeelint' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 silly cache add args [ 'coffeelint', null ]
6 verbose cache add spec coffeelint
7 silly cache add parsed spec { raw: 'coffeelint',
7 silly cache add   scope: null,
7 silly cache add   name: 'coffeelint',
7 silly cache add   rawSpec: '',
7 silly cache add   spec: '*',
7 silly cache add   type: 'range' }
8 verbose addNamed coffeelint@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'coffeelint', range: '*', hasData: false }
12 silly mapToRegistry name coffeelint
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/coffeelint
16 verbose addNameRange registry:https://registry.npmjs.org/coffeelint not in flight; fetching
17 verbose request uri https://registry.npmjs.org/coffeelint
18 verbose request no auth needed
19 info attempt registry request try #1 at 10:22:10
20 verbose request id 4d4b8cae84f08a01
21 verbose etag "3M75DKO5CKF5HR02T670OPLOU"
22 http request GET https://registry.npmjs.org/coffeelint
23 http 304 https://registry.npmjs.org/coffeelint
24 silly get cb [ 304,
24 silly get   { date: 'Mon, 15 Dec 2014 04:52:12 GMT',
24 silly get     server: 'Apache',
24 silly get     via: '1.1 varnish',
24 silly get     'last-modified': 'Mon, 15 Dec 2014 04:52:12 GMT',
24 silly get     'cache-control': 'max-age=60',
24 silly get     etag: '"3M75DKO5CKF5HR02T670OPLOU"',
24 silly get     age: '0',
24 silly get     'x-served-by': 'cache-sn88-SIN',
24 silly get     'x-cache': 'HIT',
24 silly get     'x-cache-hits': '1',
24 silly get     'x-timer': 'S1418619132.555107,VS0,VE198',
24 silly get     vary: 'Accept',
24 silly get     'content-length': '0',
24 silly get     'keep-alive': 'timeout=10, max=50',
24 silly get     connection: 'Keep-Alive' } ]
25 verbose etag https://registry.npmjs.org/coffeelint from cache
26 silly addNameRange number 2 { name: 'coffeelint', range: '*', hasData: true }
27 silly addNameRange versions [ 'coffeelint',
27 silly addNameRange   [ '0.0.1',
27 silly addNameRange     '0.0.2',
27 silly addNameRange     '0.0.3',
27 silly addNameRange     '0.0.4',
27 silly addNameRange     '0.0.5',
27 silly addNameRange     '0.0.6',
27 silly addNameRange     '0.0.7',
27 silly addNameRange     '0.1.0',
27 silly addNameRange     '0.2.0',
27 silly addNameRange     '0.3.0',
27 silly addNameRange     '0.4.0',
27 silly addNameRange     '0.5.0',
27 silly addNameRange     '0.5.1',
27 silly addNameRange     '0.5.2',
27 silly addNameRange     '0.5.3',
27 silly addNameRange     '0.5.4',
27 silly addNameRange     '0.5.5',
27 silly addNameRange     '0.5.6',
27 silly addNameRange     '0.5.7',
27 silly addNameRange     '0.6.0',
27 silly addNameRange     '0.6.1',
27 silly addNameRange     '1.0.0',
27 silly addNameRange     '1.0.1',
27 silly addNameRange     '1.0.2',
27 silly addNameRange     '1.0.3',
27 silly addNameRange     '1.0.4',
27 silly addNameRange     '1.0.5',
27 silly addNameRange     '1.0.6',
27 silly addNameRange     '1.0.7',
27 silly addNameRange     '1.0.8',
27 silly addNameRange     '1.1.0',
27 silly addNameRange     '1.2.0',
27 silly addNameRange     '1.3.0',
27 silly addNameRange     '1.4.0',
27 silly addNameRange     '1.4.1',
27 silly addNameRange     '1.5.0',
27 silly addNameRange     '1.5.1',
27 silly addNameRange     '1.5.2',
27 silly addNameRange     '1.5.3',
27 silly addNameRange     '1.5.4',
27 silly addNameRange     '1.5.5',
27 silly addNameRange     '1.5.6',
27 silly addNameRange     '1.5.7',
27 silly addNameRange     '1.6.0',
27 silly addNameRange     '1.6.1',
27 silly addNameRange     '1.7.0' ] ]
28 verbose addNamed [email protected]
29 silly addNamed semver.valid 1.7.0
30 silly addNamed semver.validRange 1.7.0
31 silly cache afterAdd [email protected]
32 verbose afterAdd C:\Users\hdev11\AppData\Roaming\npm-cache\coffeelint\1.7.0\package\package.json not in flight; writing
33 verbose afterAdd C:\Users\hdev11\AppData\Roaming\npm-cache\coffeelint\1.7.0\package\package.json written
34 silly install resolved [ { name: 'coffeelint',
34 silly install resolved     description: 'Lint your CoffeeScript',
34 silly install resolved     version: '1.7.0',
34 silly install resolved     homepage: 'http://www.coffeelint.org',
34 silly install resolved     keywords: [ 'lint', 'coffeescript', 'coffee-script' ],
34 silly install resolved     author: { name: 'Matthew Perpick', email: '[email protected]' },
34 silly install resolved     main: './lib/coffeelint.js',
34 silly install resolved     engines: { npm: '>=1.3.7', node: '>=0.8.0' },
34 silly install resolved     repository:
34 silly install resolved      { type: 'git',
34 silly install resolved        url: 'git://github.com/clutchski/coffeelint.git' },
34 silly install resolved     bin: { coffeelint: './bin/coffeelint' },
34 silly install resolved     dependencies:
34 silly install resolved      { 'coffee-script': '~1.7',
34 silly install resolved        glob: '^4.0.0',
34 silly install resolved        ignore: '^2.2.15',
34 silly install resolved        optimist: '^0.6.1',
34 silly install resolved        resolve: '^0.6.3' },
34 silly install resolved     devDependencies: { vows: '>=0.6.0', underscore: '>=1.4.4' },
34 silly install resolved     licenses: [ [Object] ],
34 silly install resolved     scripts:
34 silly install resolved      { pretest: 'cake compile',
34 silly install resolved        test: './vowsrunner.js --spec test/*.coffee test/*.litcoffee',
34 silly install resolved        posttest: 'npm run lint',
34 silly install resolved        prepublish: 'cake prepublish',
34 silly install resolved        publish: 'cake publish',
34 silly install resolved        lint: 'cake compile && ./bin/coffeelint .',
34 silly install resolved        'lint-csv': 'cake compile && ./bin/coffeelint --csv .',
34 silly install resolved        'lint-jslint': 'cake compile && ./bin/coffeelint --jslint .',
34 silly install resolved        compile: 'cake compile' },
34 silly install resolved     gitHead: 'abe43e69f0ecb34b439e7681d687c14fd7c496f4',
34 silly install resolved     bugs: { url: 'https://github.com/clutchski/coffeelint/issues' },
34 silly install resolved     _id: '[email protected]',
34 silly install resolved     _shasum: '84d01a7f0c0d5f532eece096a1603ee37c220634',
34 silly install resolved     _from: 'coffeelint@*',
34 silly install resolved     _npmVersion: '2.1.4',
34 silly install resolved     _nodeVersion: '0.10.28',
34 silly install resolved     _npmUser: { name: 'asaayers', email: '[email protected]' },
34 silly install resolved     maintainers: [ [Object], [Object], [Object] ],
34 silly install resolved     dist:
34 silly install resolved      { shasum: '84d01a7f0c0d5f532eece096a1603ee37c220634',
34 silly install resolved        tarball: 'http://registry.npmjs.org/coffeelint/-/coffeelint-1.7.0.tgz' },
34 silly install resolved     directories: {},
34 silly install resolved     _resolved: 'https://registry.npmjs.org/coffeelint/-/coffeelint-1.7.0.tgz',
34 silly install resolved     readme: 'ERROR: No README data found!' } ]
35 info install [email protected] into C:\Program Files\nodejs
36 info installOne [email protected]
37 verbose installOne of coffeelint to C:\Program Files\nodejs not in flight; installing
38 verbose lock using C:\Users\hdev11\AppData\Roaming\npm-cache\_locks\coffeelint-b593cebdb3430387.lock for C:\Program Files\nodejs\node_modules\coffeelint
39 silly install write writing coffeelint 1.7.0 to C:\Program Files\nodejs\node_modules\coffeelint
40 silly cache addNamed cb [email protected]
41 verbose unbuild node_modules\coffeelint
42 info preuninstall [email protected]
43 info uninstall [email protected]
44 verbose unbuild rmStuff [email protected] from C:\Program Files\nodejs\node_modules
45 verbose gentlyRm verifying that C:\Program Files\nodejs is managed by npm
46 silly cacheAndTest C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
47 silly isManaged C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
48 silly cacheAndTest C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
49 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
50 silly isManaged C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
51 verbose isManaged no path
52 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
53 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
54 verbose gentlyRm C:\Program Files\nodejs is not managed by npm
55 verbose unlock done using C:\Users\hdev11\AppData\Roaming\npm-cache\_locks\coffeelint-b593cebdb3430387.lock for C:\Program Files\nodejs\node_modules\coffeelint
56 verbose stack Error: Refusing to delete: C:\Program Files\nodejs\coffeelint.cmd not in C:\Program Files\nodejs
56 verbose stack     at clobberFail (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:166:12)
56 verbose stack     at C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:56:14
56 verbose stack     at zalgoSafe (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\dezalgo\dezalgo.js:20:10)
56 verbose stack     at map (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\async-some\some.js:28:33)
56 verbose stack     at reduce (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\async-some\some.js:38:5)
56 verbose stack     at predicate (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:130:14)
56 verbose stack     at map (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\async-some\some.js:30:5)
56 verbose stack     at reduce (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\async-some\some.js:38:5)
56 verbose stack     at predicate (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:130:14)
56 verbose stack     at map (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\async-some\some.js:30:5)
57 verbose cwd E:\temp
58 error Windows_NT 6.2.9200
59 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "coffeelint"
60 error node v0.10.32
61 error npm  v2.1.9
62 error path C:\Program Files\nodejs\coffeelint.cmd
63 error code EEXIST
64 error Refusing to delete: C:\Program Files\nodejs\coffeelint.cmd not in C:\Program Files\nodejs
File exists: C:\Program Files\nodejs\coffeelint.cmd
Move it away, and try again.
65 verbose exit [ 1, true ]
66 verbose unbuild node_modules\coffeelint
67 info preuninstall [email protected]
68 info uninstall [email protected]
69 verbose unbuild rmStuff [email protected] from C:\Program Files\nodejs\node_modules
70 verbose gentlyRm verifying that C:\Program Files\nodejs is managed by npm
71 silly isManaged C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
72 silly isManaged C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
73 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
74 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
75 silly isManaged C:\Program Files\nodejs is not inside C:\Program Files\nodejs\node_modules
76 verbose isManaged no path
77 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
78 silly isManaged C:\Program Files\nodejs is not inside C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32
79 verbose gentlyRm C:\Program Files\nodejs is not managed by npm
80 error error rolling back Error: Refusing to delete: C:\Program Files\nodejs\coffeelint.cmd not in C:\Program Files\nodejs
80 error error rolling back     at clobberFail (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:166:12)
80 error error rolling back     at C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\lib\utils\gently-rm.js:56:14
80 error error rolling back     at C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\dezalgo\dezalgo.js:17:12
80 error error rolling back     at flush (C:\Users\hdev11\AppData\Roaming\nvm\v0.10.32\node_modules\npm\node_modules\dezalgo\node_modules\asap\asap.js:27:13)
80 error error rolling back     at process._tickCallback (node.js:419:13)
80 error error rolling back  { [Error: Refusing to delete: C:\Program Files\nodejs\coffeelint.cmd not in C:\Program Files\nodejs]
80 error error rolling back   code: 'EEXIST',
80 error error rolling back   path: 'C:\\Program Files\\nodejs\\coffeelint.cmd' }

Error while install

I get the following error while installing and it just goes into loop
install screen <-> error
01

Number pad detection of version

Ok, so I'm installing 0.10.35 64 but when I click enter in the Console it just outputs:
C:\Users\Mairuzu>nvm install v0.10.35 64
Node.js vv0.10.35 is only available in 32-bit.

but if you hit the numbers in the top row I get:
C:\Users\Mairuzu>nvm install 0.10.35 64
Downloading node.js version 0.10.35 (64-bit)... Complete

This is a bug with the keyboard or my console, or something just weird.

why i failed to run nvm?

what's wrong?

C:\Windows\system32>nvm

ERROR open \settings.txt: The system cannot find the file specified.

C:\Windows\system32>nvm list available

ERROR open \settings.txt: The system cannot find the file specified.

Ability to use nvm to launch a specific version of node.

Although one could use batch files for this, and just accept that the symlink will swap around... it would be nice if one could nvm (version) -run somescript or similar for executing npm scripts with a specific version of node... with everything after the -run passed to node as parameters... nvm 0.11.10 -run --harmony my-new-tool.js as an example.. because I'm moving towards doing new projects with 0.11 and older ones still on 0.10, it would be nice to be able to set my services to use the appropriate version.

Node v#.##.## not installed

I am a newbie on this so bare with me.

Trying to switch between node installations does not work. When using nvm list it shows all the installed versions.
image

But when trying to switch to another version, it says it is not installed.
image

I figured I was doing something wrong so I tried to specify an architecture. Still nothing.
image

But if I keep re-installing then switching, then it works.

Running Windows 8.1
nvm installed on c:
root set to c:\nvm

Issue #30 maybe related.

And thanks btw for this. Really great piece of software @coreybutler .

Install problem(s)

Ok, I'm having a lot of issues, but I would LOVE to get this working on my windows desktop instead of my older mac laptop. Thanks very much in advance for creating nvm for windows! I'm using Win7 64-bit.

The installer puts the files in my username\AppData\Roaming folder by default. Is this correct behavior? If these files follow me to another windows computer, will everything still work?

When cmd.exe is run at the end of the installer, it complains about a missing \settings.txt, even though it is present. If I close that cmd.exe and start a new one, the error message goes away. (Possibly the cmd.exe launched from the installer has not yet picked up the new %path% environment variable?)

Even though the '\settings.txt' error message has gone away from subsequent cmd.exe invocations, the path is still not set up properly-- %NVM_HOME% and %NVM_SYMLINK% are listed when I inspect the path from the command line. (I mentioned this in another issue thread. Workaround is to add the proper dirs to the path manually a la "set path=%path%;%nvm_home%;%nvm_symlink%").

When I open up Win7's 'Environment Variables' dialog box, it looks like the two nvm-windows variables are both in my User Variables as well as my System Variables. I'm not used to seeing variables duplicated like that.

Running "nvm use [...]" causes two separate windows security dialogs to open due to making changes to the symlink in \Program Files.

I run "nvm install 0.10.33" and it seems to work, but only after I run "nvm use ..." which is a little odd since this is the first and only node.js I've installed thus far. But maybe that's how the 'nix versions work.

When I then install another node.js, 0.11.14, install succeeds. When I "run nvm use 0.11.14" that works too. And when I run "nvm list" I can see my two installed versions, although I'm seeing "?-bit executable" instead of "64-bit".

When I try and switch from 0.11.14 to 0.10.33, I get the error "node v0.10.33 (64-bit) is not installed." I get a similar error when I run "nvm use 0.11.14".

So then I run the uninstaller for nvm-windows in the control panel. For some reason a new PATH variable is now added to my User variables where none was there before. It appears to be a copy of my System variable PATH. So now when I open a cmd.exe, my PATH is doubled in size and content. (Deleting my User variable for PATH fixes this.)

npm ls -g lists npm

I noticed that npm ls -g lists npm itself (with all its dependencies) now that I've installed Node via nvm. When I had Node installed the "normal" way it didn't (which I've just verified with a colleague). It seems to work fine otherwise (though I haven't tested it that much yet), but the fact that it behaves differently is a bit disturbing.

Do you know why and are there any other differences?

Misleading installer instruction

I just learned about nvm-windows when googling for a convenient way to update node (on Windows) and it seems to be just what I need!

However, it wouldn't play at first and it took me a while to figure out why. In the installer I changed the default paths to my liking (which I almost always do), but I misunderstood the instruction that says "Select the folder in which Setup should create the symlink" (see screenshot below) and I chose an existing folder.

The installation completed without problems and (after changing some permissions) I could run nvm install latest to install version 0.10.35. Then I tried to run nvm use 0.10.35. It gave me an UAC prompt (like it's supposed to?) and then failed silently - no symlink created!

It wasn't obvious (at least to me) that the reason was that I had entered a path to an existing directory (since I thought that was what the installer asked for). You should really rephrase that instruction in the installer and perhaps also output a descriptive error message if there is a folder in the way when creating the symlink.

screen

nonadmin command window does not find nvm

On Windows 8.1 with all patches, I have experienced that nvm does not find nvm in a nonadmin window.

I've debugged it to be caused by the existence of NVM_HOME and NVM_SYMLINK in the user environment variable list. When I remove them from the user list and allow them to only exist in the system list, a nonadmin window properly finds nvm via the PATH.

Bug on installing iojs ;-)

alex@LIGHTNIGHT ~
$ nvm install iojs
panic: runtime error: index out of range

goroutine 16 [running]:
runtime.panic(0x648460, 0x7c947c)
        C:/Go/src/pkg/runtime/panic.c:279 +0xe9
_/C_/Users/Corey/Documents/workspace/Experiments/nvm/src/nvm/web.IsNode64bitAvailable(0x12520130, 0x4, 0x666180)
        C:/Users/Corey/Documents/workspace/Experiments/nvm/src/nvm/web/web.go:124 +0x1d6
main.install(0x12520130, 0x4, 0x666180, 0x2)
        C:/Users/Corey/Documents/workspace/Experiments/nvm/src/nvm.go:145 +0x279
main.main()
        C:/Users/Corey/Documents/workspace/Experiments/nvm/src/nvm.go:65 +0x599

goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
        C:/Go/src/pkg/runtime/mheap.c:507
runtime.goexit()
        C:/Go/src/pkg/runtime/proc.c:1445

goroutine 18 [runnable]:
bgsweep()
        C:/Go/src/pkg/runtime/mgc0.c:1976
runtime.goexit()
        C:/Go/src/pkg/runtime/proc.c:1445

goroutine 19 [runnable]:
runfinq()
        C:/Go/src/pkg/runtime/mgc0.c:2606
runtime.goexit()
        C:/Go/src/pkg/runtime/proc.c:1445

Tested with proxies?

I am having trouble getting nvm-windows to work with my proxy.

From the nvm settings.txt file, I see that it has set everything in the proxy URL to lower case. That trashed my password and ID.
Second, when I manually edit the settings file (and then verify the proxy URL from the command line), it still fails with a message stating that proxy authentication is required.

I am using a proxy URL of the form http://userid:[email protected]:port#

This same string works in npm and git. Does your implementation expect something different?

So confusing...

~/Documents/Workspace
$ nvm install v0.12.0
Node.js vv0.12.0 is only available in 32-bit.

~/Documents/Workspace
$ nvm install 0.12.0
Downloading node.js version 0.12.0 (64-bit)... Complete
Downloading npm version 2.5.1... Complete
Installing npm v2.5.1...

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

nvm use 0.12.0

nvm use *version* not properly switching after install with aptana terminal

I've been using nvm-windows successfully for a few weeks. For a while I only had 0.10.32 installed. I primarily use Aptana terminal inside eclipse IDE.

node just released 0.10.33 recently, so, using the terminal inside eclipse:

nvm list

showed that I was using 0.10.32 (only version that was installed).

then
nvm install latest

Once it displayed that npm and node had been installed,

$ nvm use 0.10.33
Now using node v0.10.33

I then issued the following commands, and receieved the results:

fhgjgbie

It might be of note that I was using 0.10.32 fine before this inside the same terminal. Anyways. after that, I opened up the windows command prompt:

capture

Note no asterisk in the nvm list.

After that I went back to eclipse (did NOT restart it), and everything ran fine, as it should.

I do not know if this is a "bug," or if it can be duplicated. Just simply describing my issue.

Easier No-Install instructions

We should be using powershell/CLI in the wiki/scripts to assist the user.
Create an "install.cmd" file with these lines:

setx /m NVM_HOME "C:\nvm"
setx /m NVM_SYMLINK "C:\Program Files\nodejs"
setx /m PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%"
(echo root: C:\nvm && echo path: C:\Program Files\nodejs && echo arch: 64 && echo proxy: none) > C:\nvm\settings.txt
notepad C:\nvm\settings.txt

Better CLI

Look at nodist CLI:

Usage:

    nodist                          List all installed node versions.
    nodist list
    nodist ls

    nodist dist                     List all available node versions.
    nodist ds

    nodist add <version>            Download the specified node version.
    nodist + <version>

    nodist rm <version>             Uninstall the specified node version.
    nodist - <version>

    nodist <version>                Use the specified node version globally
    nodist global <version>         (downloads the executable, if necessary).

    nodist use <version>            Use <version> in the current environment only
    nodist env <version>            (usually the current terminal window).

    nodist local <version>          Use <version> in this directory and its subdirectories.
                                    (will add a ./node-version file)

    nodist args <version> <args..>  Set command line args that will always be passed
                                    to this version (e.g. --harmony-generators or v8 tweaks).
                                    Omit <args..> to reset.

    nodist run <version> -- <args..>    Run <args> with the specified node version
    nodist r <version> -- <args..>      (downloads the executable, if necessary).

    nodist bin <version>            Get the path to the specified node executable
                                    (downloads the executable, if necessary).

    nodist path <version>           Get the path to the specified node version directory
                                    (downloads the executable, if necessary).

    nodist selfupdate               Update nodist's dependencies.

    nodist --help                   Display this help

    nodist -v                       Display nodist version

Examples:

    nodist 0.8.1                    Use node v0.8.1 globally

    nodist v0.5.10                  Use node v0.5.10 globally

    nodist - 0.5.10                 Uninstall node v0.5.10

    nodist r v0.8.1 -- foo.js -s    Run `foo.js -s` with node v0.8.1, regardless
                                    of the global version

    nodist latest                   Use the latest available node version globally
                                    (downloads the executable, if necessary).

    nodist stable                   Use the latest stable available node version
                                    globally (downloads the executable, if necessary).

    nodist + all                    Installs *all* available node versions.
                                    (Get yourself a cuppa in the meantime...)

It's just so comfortable to use.

Apart of being able to change the node version globally as well as in the current terminal, it has a latest & stable shorthands accepted in both install and use commands, which is super helpful, as I don't have to constantly look up or remember current node versions.

Use command is default so you can do super quick commands like nodist latest or nodist stable to switch between latest and stable node versions.

In comparison, using nvm CLI is quite a pain.

Autodetect Platform

Autodetect 32 vs 64 bit platforms.

  • Use os.Getenv("PROCESSOR_ARCHITECTURE") to automatically detect 32 vs 64 bit architecture.
  • Add a line in the settings.txt to allow override
  • Add a flag to quickly switch the architecture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.