10

--registry https://registry.npmjs.org安装时用于绕过类似人工制品的代理npm install但我想做类似的事情,npm xxx因为我遇到

npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="Artifactory Realm"

当尝试做npx create-react-app myapp

那有可能吗?

从字面上看,我在网上找不到任何有关此的信息!

4

1 回答 1

8

你可以运行类似的东西:

npm_config_registry=https://registry.npmjs.org npx xxx

这是npm 团队建议的。我遇到了同样的问题,但那是因为我需要让 npx 指向一个私有注册表。

于 2021-03-10T04:11:11.893 回答