question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install not working in npm 6.9.0 when authentication changes

See original GitHub issue

Describe the bug npm install is not working for npm v6.9.0 when the access is change from $all to particular users in config.yaml

To Reproduce Steps to reproduce the behavior:

  1. In server: Go to ‘config.yaml’

  2. In server: Under packages section grant the ‘access’ to one/many users (space separated) instead of $all. Something like

packages:
'@*/*':
# scoped packages
access: xxx yyy
publish: xxx
unpublish: xxx
proxy: npmjs
  1. In server: Optionally enable logs with
logs:
# - { type: stdout, format: pretty, level: info, path: verdaccio.log}
- {type: file, path: verdaccio.log, level: info}
  1. In client: Login with username xxx or yyy. Login is successful

  2. In client: run npm install

  3. You will see

npm WARN @scope/package-name@0.1.7 No repository field.

npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to
be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Roaming\npm-cache\_logs\2019-07-09T14_38_41_734Z-debug.log

Expected behavior It should work and the package should be downloaded into node_modules as there is no problem if npm version is v3.10.10 (verified)

Update I have set this up(verdaccio) in my local machine running npm v6.9.0 and I tried running npm install in different machine in the same LAN. It works with both npm 3.10.10 and 6.9.0. May be this happens only in server which is running centos7(could be the reason) or verdaccio in external network (possibilities are there) . Hope this helps!

2019-07-09T14_38_41_734Z-debug.log

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

6reactions
sathishchandran97commented, Jul 16, 2019

This issue got fixed by adding always-auth=true in .npmrc file. To do so run npm config set always-auth=true from cmd.

Thanks @juanpicado and @DanielRuf for your time and support.

1reaction
juanpicadocommented, Jul 16, 2019

Oh … 😃 Thanks for the feedback. Interesting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plesk npm 12 installed, but showing 6.9.0 - node.js
The problem is that when I try to install authentication with Bootstrap for Laravel, and I get to the point where I need...
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
How to Install npm, Master npm Commands & Use Packages
This step-by-step guide will show you how to install npm, and master common commands in the Node Package Manager (npm) command-line ...
Read more >
npm packages in the Package Registry - GitLab Docs
Troubleshooting · npm publish targets default npm registry ( registry.npmjs.org ) · npm install returns npm ERR! 403 Forbidden · npm publish returns...
Read more >
Changelog - Cypress Documentation
Installing Cypress on your system now requires Node.js 14, 16 or 18+. ... alternative to 6.9.0, which was mistakenly published with breaking changes....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found