This is a rather obscure issue. I have an Angular app that will be running through Codeship for CI. However, when it comes time to run npm install on the Codeship box, npm gives back
-npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
\npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
\npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm ERR! Linux 4.2.0-38-generic
npm ERR! argv "/home/rof/.nvm/versions/node/v4.1.1/bin/node" "/home/rof/.nvm/versions/node/v4.1.1/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! fetch failed with status code 502
This was quite strange, since the npm install worked just fine on my box. My first instinct was that it had to be an issue with the NPM repository, so I grabbed the url for the package(https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz) and threw it into a new Chrome tab. Sure enough, the archive downloaded almost instantly. I was confused by this, so I tried the Codeship build again, but got the same results. I decided to SSH into the Codeship box to see if I could access it. I ran
curl https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
and as I expected I got the 502 error. However, when I ran the same command from the terminal on my machine, I got the same result, even though the npm install ran perfectly for me. I wasn't able to find anyone else having this type of an issue, and a 502 seems like a very rare code for the NPM registry to be returning. Any ideas?
This is a problem with the registry.npmjs.org in some regions.
Here is issue:
https://github.com/npm/npm/issues/13284
Try to keep one registry inside .npmrc file, only one of them works.
The order of registry also does matter. Also try to set:
npm config delete proxy
npm config delete https-proxy
to clean proxy inside terminal.
I'm seeing the same issue via npm install on Ubuntu 14 running on AWS
curl https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.0.tgz
returns 502 Bad Gateway from the ubuntu server, but works fine from local client
There's an open issue at NPM for this:
https://github.com/npm/npm/issues/13284
NPM just acknowledged the issue and they are working on it. Your can track the status at below link.
http://status.npmjs.org
I got this error while publishing my package on npm. After banging my head against the wall for a few hours, I realized I was on mobile hotsopt. I switched to wifi and bang there was my package on npm!
Related
I'm trying to install packages for an angular project based on a template of the customer.
He has provided me this let's say ready to use template, but when I run npm install I get errors.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://artifactory.springlab.enel.com/artifactory/api/npm/npm-public/#angular-devkit%2fbuild-angular
npm ERR! 404
npm ERR! 404 '#angular-devkit/build-angular#~0.1102.19' 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.
As you can see the issue is on a GET from a server of theirs. I have highlighted this issue but they said that is not their fault as they can run npm install without any issue.
Please note that:
When I run the npm install I'm logged in inside their VPN to access the servers.
I've tried several versions of node and npm, using the same version that is working on their machines.
I've tried both --force and --legacy-peer-deps and I always get the same error.
I have no issues on npm in any of the other 10s projects I work on (for other customers)
I have also disabled the antivirus.
IT support from the company is not providing me with help, so I'm alone and I don't know what to check.
How can I get more details on why I got a 404 on that?
I have been trying to make a vite project as well as install some packages into some already existing projects in vscode yet when I do this I get the error of:
npm ERR! code EHOSTUNREACH
npm ERR! syscall connect
npm ERR! errno EHOSTUNREACH
npm ERR! request to https://registry.npmjs.org/create-vite failed, reason: connect EHOSTUNREACH 2606:4700::6810:1123:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/chimera/.npm/_logs/2022-11-12T23_58_02_327Z-debug-0.log
I have no idea how to fix this and it is quite annoying as I am not able to make or change any projects ): I also have tried searching this on StackOverflow and I get a similar error but none of the fixes I have tried seems to do anything. If you know how to solve this could you please explain why this happened ): I am also finding and I don't know if this is related to it or not that my terminals take forever to load when before when I opened one they took less than a second to do so? Also, I am using Ubuntu (The latest version) and previously just used the latest version of node and there is where I got the error, the moment I downgraded to node v16 it went away. The command I tried running was the command for creating a new react project and also to adding daisyui to a project I had.
Sorry for the following wall of text.
So I've been using someone else's meteor app. (they open sourced it) It's currently un-built and I've been running it on dev-mode. It's a lot slower than expected and users are having issues connecting to my local machine. So I'm attempting to deploy the app by following: https://guide.meteor.com/deployment.html#deploying.
So I've been getting errors when trying to run npm i. My dad recommended me to run npm cache verify and try again, then npm cache clean as a last resort. Neither worked and I've still am getting errors. Although as soon as I tried again after running npm cache verify the error amount skyrocketed. I unfortunately don't have the errors I got before I cleared my cache but I have the current logs here: https://pastebin.com/dAcRnE9v But here is a snapshot:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#2.0.2 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR! Failed at the fibers#2.0.2 install script.
I honestly don't have any idea what todo. I've never worked with meteor before, nor the fibers module that's failing. I don't even know if this is the right place I should be asking for help.
I once had fibers npm package in my package.json which caused a similar error. Once I removed it everything built just fine.
You can't change Meteor's version of node - for compatibility reasons it bundles node/npm with Meteor to protect you. Just prefix all your npm/node commands with meteor like this:
meteor npm install
It won't use the node version (13.x) that you have installed
I have installed Node.js and when I run the command Node -v it gave me exact version and then I ran npm -v, it replied back with the version.
But when I try to install appium using the command "npm install appium" I have got
npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to
https://registry.npmjs.org/appium failed, reason: getaddrinfo
EAI_AGAIN my.proxyserver.com:8080
can some one tell me why this is happening ?
Connect to Direct Internet like Mobile hotspot or WiFi and try again.
npm install usually fails with corporate proxy.
According to this Microsoft page, this error translates to "A temporary failure in name resolution occurred". Therefore, I suppose you can just try again later. Or, depending on your version of Windows, try this answer. I just tried installing this npm package and it works normally on my Windows 10 box.
I'm trying to implement this plugin called Share Button from npm my running https://github.com/carrot/share-button. However after doing that and waiting around 5mins I get the following output:
npm ERR! fetch failed https://registry.npmjs.org/i/-/i-0.3.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
⸨ ░░░░░░░░░░░░░░⸩ ⠇ fetchMetadata: WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
Does anyone know why this would happen and a way to get round it? Thanks
If you tried
npm i --save-dev share-button
like me. Try using the github repo like that
npm install --save-dev carrot/share-button
That works without an error on my machine :)
Try to execute the command below:
npm config set registry http://registry.npmjs.org/
That will get packages npm install over HTTP.
Sometimes you also get a 504 error if you have an incompatible npm version.
npm install -g npm#6.13.4
The npm versions v3, v6 and v8 are partly incompatible. So just try to install a different npm version.