Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install is not working #2

Open
chiragBorkarEV opened this issue Jun 4, 2019 · 5 comments
Open

npm install is not working #2

chiragBorkarEV opened this issue Jun 4, 2019 · 5 comments

Comments

@chiragBorkarEV
Copy link

Hello,

I am trying to install this packaghe in my local project, but its not working. I have configured npm through .npmrc for authentication purpose.
Can you share, how are you authenticating.

Error:

npm ERR! code E404
npm ERR! 404 Not Found: @codertocat/hello-world-npm@latest

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\test\AppData\Roaming\npm-cache_logs\2019-06-04T17_31_12_783Z-debug.log

@jcockhren
Copy link

npm install points to npmjs.org by default.

Add a .npmrc to your project directory with the contents for npm to use GitHub's repo for the codertocat scope.

@codertocat=https://npm.pkg.github.com/

See: https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry#installing-a-package

@ilg-ul
Copy link

ilg-ul commented Oct 30, 2019

The correct syntax in .npmrc is:

@codertocat:registry=https://npm.pkg.github.com

After setting this, npm will know what server to query, but the GitHub server will not authorize the request:

$ npm install
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ilg/.npm/_logs/2019-10-30T09_25_11_181Z-debug.log

@RenChunhui
Copy link

I have been tossing for many days, I think it is the stability of GitHub

@ilg-ul
Copy link

ilg-ul commented Feb 18, 2020

I have been tossing for many days, I think it is the stability of GitHub

Can you be more specific?

I did not try this recently, but when I did, the error was not transient, at that time reading npm packages from GitHub required authentication. It was documented, and considered a feature, not a bug.

@Kosarhasanzadeh
Copy link

Iran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@jcockhren @ilg-ul @RenChunhui @chiragBorkarEV @Kosarhasanzadeh and others