Using NPM_TOKEN in powershell

Viewed 129

I need to instruct someone else in using a privately published script from our npm registry and, in linux, I am used to being able to just set the NPM_TOKEN value with a read-only permission in the environment of a shell before using npx. This does not automatically work in windows powershell. What I have tried:

set NPM_TOKEN as an environment var in powershell and try npx-ing the script:

$Env:NPM_TOKEN='a_token'
npx @our-scope/the-privately-published-package

But what I get back is a 404, the same you would get if the package did not exist.

Is there anyone who has experience npx-ing privately published packages with NPM_TOKENs?

Any help would be awesome.

0 Answers
Related