【问题标题】:How to run npx with something similar to `--registry https://registry.npmjs.org` when running npm install to get around artifactory?运行 npm install 以绕过工件时,如何使用类似于 `--registry https://registry.npmjs.org` 的内容运行 npx?
【发布时间】:2020-02-24 16:30:08
【问题描述】:

--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

这可能吗?

我在网上根本找不到任何关于此的信息!

【问题讨论】:

标签: node.js npm npx


【解决方案1】:

你可以运行类似的东西:

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

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

【讨论】:

    猜你喜欢
    • 2019-03-06
    • 1970-01-01
    • 1970-01-01
    • 2016-05-03
    • 1970-01-01
    • 2018-11-22
    • 1970-01-01
    • 2014-04-18
    相关资源
    最近更新 更多