I create a.bat on windows 7, the content of a.bat is:
@echo off npm config set registry https://registry.npmjs.org/
and then run a.bat, but not working, I find the word "set" is special keyword for npm and bat, is there any methods to resolve this question?
This question is tagged with
~ Asked on 2014-03-13 16:34:19
You shouldn't change the npm registry using
Instead try to use modify the
.npmrc file which is the configuration for
The correct command for changing registry is
npm config set registry <registry url>
you can find more information with
npm help config command, also check for privileges when and if you are running
.bat files this way.
~ Answered on 2014-03-13 21:07:28
We can also run npm install with
registry options for multiple custom registry URLs.
npm install --registry=https://registry.npmjs.org/ npm install --registry=https://custom.npm.registry.com/
~ Answered on 2017-05-09 00:27:00