npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.54k stars 3.2k forks source link

npm WARN registry No auth for URI, but auth present for scoped registry. #5490

Open vullamgunta opened 2 years ago

vullamgunta commented 2 years ago

Is there an existing issue for this?

This issue exists in the latest npm version

Current Behavior

we have NodeJS 12 base image and now we upgraded to Nodejs16. NPM version used is 8.11.0

When we tried to build the docker image through Azure CI/CD getting the error "npm WARN registry No auth for URI, but auth present for scoped registry"

"https://private.registry.com/[project]/_packaging/[scope]-framework@Local/npm/registry/@[scope]/auth-lib/-/auth-lib-0.1.1-preview.1026678.tgz" -- this seems not a valid one.

what exactly this tgz file refers to? And from where it's been picked up. Request to help me on this

.npmrc file for reference @[scope]:registry=https://private.registry.com/[project]/_packaging/[scope]-framework%40Local/npm/registry/ always-auth=true

npm WARN registry No auth for URI, but auth present for scoped registry. npm WARN registry npm WARN registry URI: https://private.registry.com/[project]/_packaging/[scope]-framework@Local/npm/registry/@[scope]/auth-lib/-/auth-lib-0.1.1-preview.1026678.tgz npm WARN registry Scoped Registry Key: //private.registry.com/_packaging/[scope]-framework%40Local/npm/ npm WARN registry npm WARN registry More info here: https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

Expected Behavior

Expected behavior is Azure docker task run with node.js base image without any issues. And azure application service should show node version 16 when we verified it from Kudu.

But the node version is showing 14 when we use node -v command to check node version status from Azure app service.

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

samcart-fwalker commented 1 year ago

I hit this trying to install a package I published to the Google Artifact Registry. The packa

NPM version: 8.12.1 Commands run:

npx google-artifactregistry-auth
yarn add @samcart-test/scuba

Output:

npm WARN registry No auth for URI, but auth present for scoped registry. npm WARN registry npm WARN registry URI: https://registry.yarnpkg.com/@samcart-test/scuba/-/@samcart-test/scuba-2.0.3.tgz npm WARN registry Scoped Registry Key: //us-npm.pkg.dev/samcart-ops/samcart-test/ npm WARN registry npm WARN registry More info here: https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.yarnpkg.com/@samcart-test/scuba/-/@samcart-test/scuba-2.0.3.tgz npm ERR! 404 npm ERR! 404 '@samcart-test/scuba@https://registry.yarnpkg.com/@samcart-test/scuba/-/@samcart-test/scuba-2.0.3.tgz' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/scottwalker/.npm/_logs/2023-01-06T17_18_13_532Z-debug-0.log

I'm not sure what other info to include since the .npmrc content is specific to our private registry.