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.
+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
Most helpful comment
modify
..\AppData\Roaming\nvm\settings.txt
by yourself .