I'm at my wits' end as I keep hitting this error when I'm trying to create-react-app. I am not using any proxies (like company proxy etc), as this is on my personal desktop.
When I check the logs, there is nothing.
I have tried the following solutions:
tried using npm config set registry http://registry.npmjs.org/ (have also tried going to this site on the browser, and I am indeed able to access it)
tried the following commands to remove proxy:npm config rm proxy, npm config rm https-proxy, npm config delete proxy, npm config delete http-proxy, npm config delete https-proxy
tried npm uninstall -g create-react-app to update it
tried npm cache clean --force
installed yarn and used its create-react-app
Uninstalled Node and reinstalled Node
Updated to the latest version of npm
Launched the command prompt in admin mode
Disabled the "Automatically Detect Settings" in the Windows Proxy settings
Any help greatly appreciated!
I have tried to inject angular dependency more and more time by applying this command but every time gets this attached error. If you have any solution please share. Thank you
npm cache clean --force
npm install
npm install --legacy-peer-deps
Angular, npm, node version like this...
npm cache clean --force
npm install -g #angular/cli#latest
Try to look up the registry, I change the registry as https://www.npmjs.com by mistake, change it as follow
npm config set registry https://registry.npmjs.org
My solution:
npm config set registry registry.npmjs.org
npm install or npm install --legacy-peer-deps
Using the command prompt, I am trying to install angular CLI and it fails. I have npm version 5.5.1 and node version v8.9.1. I am trying to install angular cli using the command
npm install -g #angular/cli#latest
and it fails with the error:
npm ERR! code E404
npm ERR! 404 Not Found: #angular/cli#latest
npm ERR! A complete log of this run can be found in:
I look at the log file and I see its trying to fetch the package from a location that doesn't exist. Not sure from where it gets pulled. How do I fix this location path and install angular cli. Same happens when I try to install typescript or any other npm package. all of them try to install from the location mentioned below and it fails with 404
8 http fetch GET 404
http://nuget.feed.xyz.corp:8729/npm/FeedNPM/#angular%2fcli 109ms
9 silly fetchPackageMetaData error for #angular/cli#latest 404 Not Found:
#angular/cli#latest
10 verbose stack Error: 404 Not Found: #angular/cli#latest
npm config set registry http://registry.npmjs.org
NPM registry documentation
Try first this commands (in windows run as administrator)
npm config set registry http://registry.npmjs.org
npm install -g #angular/cli
if still not working let's update NPM and nodejs by running this commands
npm -g install npm
npm cache clean -f
npm install -g n
then try to run
npm install -g #angular/cli
This should solve this problem
in my case it was .npmrc file in my project dir, which kept overwriting my global registry url. As soon as I deleted it, I could finally use npm install
Add a .npmrc file in the root of the project. .npmrc will look like below -
#xy:registry=https://xyz.jfrog.io/xyz/api/npm/npm-local/
#xy-app:registry=https://xyz.jfrog.io/xyz/api/npm/npm-local/
And Delete all the field eg - email , auth etc.
Find out what is the registry url of your application and put it into the registry.
Then run command - npm install
And it will work.
It was giving the same error for me when I use office network/vpn as they have 'umbrella' DNS security shield. To solve this issue, connect to personal network and type the below commands:
npm config set registry http://registry.npmjs.org
npm install -g #angular/cli
Alternative, another option to avoid 404 npm error
check if your terminal is in the root directory, if not your npm scripts will not execute
because it will not be able to see the package.json
I had same problem with a private package.
Need to:
npm adduser
npm login
I spent hours on this.
I had to follow the below steps to get it to work (mac).
Delete my LOCAL (not project) .npmrc by running:
rm /Users/<NAME>/.npmrc
Then set the registry:
npm config set registry https://registry.npmjs.org/
Then follow the steps for logging in to npm:
npm login
Check what's in your config list by running:
npm config list
It should look like this:
//registry.npmjs.org/:_authToken = (protected)
registry = "https://registry.npmjs.org/"
Hope it works for you too.
change your access level to public. type this in the terminal
npm --access=public
install your angular.
sudo npm install #ngular/cli
In my case, that's a typo error:
change trct-js-sdk to trtc-js-sdk saved my life.
My solution was as follows because I had a dependency on a private package. If you see the dependency in package.json defined in the format #scope/package, then #scope tells you that it's a scoped package that might be private.
Get the private package owner to grant you access to the package
Upgrade npm
Upgrade node
Add registry using HTTPS (not HTTP), e.g. npm config set registry https://registry.npmjs.org
Do "npm login"
Now run the build
Uninstall NPM & nodejs and install the right way NPM (Ubuntu)
sudo with npm is not recommended
To Uninstall
sudo apt-get remove nodejs
sudo apt-get remove npm
or
sudo apt-get purge nodejs
Followed by proper installation
curl -o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
To confirm open a new terminal run:
$ command -v nvm
Latest LTS release of NodeJS:
$ nvm install --lts
Set default environment
$ nvm alias default lts/*
Worked for me
I got
error 404 'dotnev#*' is not in this registry.
Deleted .npmrc file in 2 folders back over my project root
and then in the project root folder typed:
npm i dotenv
copied from:
https://www.npmjs.com/package/dotenv
Just run sudo npm config set registry http://registry.npmjs.org and then update your npm.
It is an network error , check your network connection and try to install it again.
the only command line "npm -g install npm" solved the issue for me!
the following link can be helpful to dig deep for a better understanding.
Thanks a lot.
I upgraded to latest npm 5 today and it started throwing me following error.
npm ERR! code E407
npm ERR! 407 Proxy Authorization Required: <node-module>
I have proxy setting configured in .npmrc file. Does NPM 5 maintain any other file for proxy setting?
I too was facing the same issue but I believe my issue was due to NTLM authentication as I was on windows (sigh!).
If you too are on windows, follow these steps:
Install fiddler
Open Fiddler -> Rules -> Automatically Authenticate
Change proxy and https-proxy of npm to "http://localhost:8888"
try running npm install now.
Note: You may need to change proxy settings of Git too.
I could fix it by deleting npm folder from AppData/
And then ran
npm cache clean
and reinstalled npm using
npm i -g npm#latest
I have a linux box behind a no auth proxy.
I have configured git to use https instead of git.
url.https://.insteadof=git://
I have set my http_proxy and https_proxy environment variables and also the npm proxy.
; cli configs
user-agent = "npm/3.8.6 node/v6.0.0 linux x64"
; userconfig /jenkins/.npmrc
https-proxy = "{host}:8060"
proxy = "{host}:8060"
I can install bower with:
npm install -g bower
but when i try
npm install -g grunt-cli
i get:
npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
....
npm ERR! network tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
I have tried with npm version
3.8.6 / 2.15.1
Any ideas why i can install bower and not grunt-cli from same account in same session (i can even install grunt globally, and clone grunt-cli)?
UPDATES
1: I am able to do
curl -O https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
with success, the npm https-proxy is equal to $https_proxy value.
The problem was my npm proxy was host:port, without the "http://" prefix. like the environment variable. works now.
I have no idea why bower installed though.
can you try
npm install -g grunt-cli
this looks like a network problem with your proxy configuration.
Update to the latest version of node and npm, and use the correct proxy settings.