How to run npx with something similar to `--registry https://registry.npmjs.org` when running npm install to get around artifactory?
Asked Answered
H

1

16

--registry https://registry.npmjs.org is been used to get around artifactory alike proxy when install with npm install But I want to do similiar thing with npm xxx because I encounter

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

when try to do npx create-react-app myapp

Is that something possible?

I literarily can't find any info about this online!

Hoopen answered 24/2, 2020 at 16:30 Comment(1)
solutions in this answer might hep you #53658420Radiophotograph
E
22

You can run something like:

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

This is suggested by the npm team. I ran into this same problem, but that was because I needed to have npx point to a private registry.

Extrusion answered 10/3, 2021 at 4:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.