Nvm-windows: `nvm node_mirror [url]` not work

Created on 25 Oct 2016  Â·  9Comments  Â·  Source: coreybutler/nvm-windows

My Environment

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

While typing nvm in cmd, I got help message saying nvm node_mirror [url] can set the node mirror to a different URL. But it seems not to work and is not mentioned in README. Is it deprecated or do I miss anything? Thanks.

Most helpful comment

modify ..\AppData\Roaming\nvm\settings.txt by yourself .

node_mirror: http://npm.taobao.org/mirrors/node/
npm_mirror: http://npm.taobao.org/mirrors/npm/

All 9 comments

+1

This functionality exists and should work as of version 1.1.1. Which mirror are you trying to use? Do you get an error or some other feedback from the console?

@coreybutler
your source code

var env = &Environment{
  settings: os.Getenv("NVM_HOME")+"\\settings.txt",
  root: "",
  symlink: os.Getenv("NVM_SYMLINK"),
  arch: os.Getenv("PROCESSOR_ARCHITECTURE"),
  node_mirror: "",
  npm_mirror: "",
  proxy: "none",
  originalpath: "",
  originalversion: "",
}

should modified as

var env = &Environment{
  settings: os.Getenv("NVM_HOME")+"\\settings.txt",
  root: "",
  symlink: os.Getenv("NVM_SYMLINK"),
  arch: os.Getenv("PROCESSOR_ARCHITECTURE"),
  node_mirror: os.Getenv("NODE_MIRROR"),
  npm_mirror: os.Getenv("NPM_MIRROR"),
  proxy: "none",
  originalpath: "",
  originalversion: "",
}

@coreybutler
console out the nvm's usage

+1
console out the nvm's usage when use nvm node_mirror [url]

modify ..\AppData\Roaming\nvm\settings.txt by yourself .

node_mirror: http://npm.taobao.org/mirrors/node/
npm_mirror: http://npm.taobao.org/mirrors/npm/

@ldzhu taobao had changed http → https

http also work

A small defect that need a fix?
https://github.com/coreybutler/nvm-windows/issues/285#issuecomment-472324274

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leiamac picture leiamac  Â·  4Comments

Miggleness picture Miggleness  Â·  6Comments

AllainPL picture AllainPL  Â·  7Comments

fredericrous picture fredericrous  Â·  3Comments

Deilan picture Deilan  Â·  4Comments