“npm config set registry https://registry.npmjs.or

2019-01-20 23:34发布

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?

8条回答
一纸荒年 Trace。
2楼-- · 2019-01-21 00:37

Probably I am too late to answer. But if anybody need it, following works fine, as I have used it a lot of times.

npm config set registry=https://registry.npmjs.com/
查看更多
放荡不羁爱自由
3楼-- · 2019-01-21 00:38

You can change using the .bat make sure you run the call command prior, hopefully this helps anyone in future making similar .bat commands

call npm config set registry https://registry.npmjs.org/
查看更多
登录 后发表回答