2

Without changing the global npm configuration of the workstation or creating an .npmrc file in the current directory, I want to run an npx package using a private nexus registry.

So, is it possible to run npx commands (preferably cross-paltform) with inline options like registry and strict-ssl? Something like:

npx somerunnablepackage --registry https://mynexus --strict-ssl false

I tried the snippet above on PowerShell/Windows, but my registry was not hit and it tried to reach the default registry (https://registry.npmjs.org) anyway.

vahdet
  • 6,357
  • 9
  • 51
  • 106

1 Answers1

2

Use

npm_config_registry=https://mynexus npm_config_strict_ssl=false npx somerunnablepackage

See https://docs.npmjs.com/misc/config

Nate Scarlet
  • 551
  • 5
  • 7