npm install hanging due to possible incorrect url - javascript

When I run npm install --verbose The installation hangs at:
npm http fetch GET 200 https://na.artifactory.swg-devops.com/artifactory/api/npm/wcp-cos-de-npm-virtual/chai-as-promised 1533ms
⸨ ░░░░░░░░░░░░░░░░⸩ ⠙ loadDep:tstest: sill pacote range manifest for chai-as-promised#^7.1.1 fetched in 1558ms
I pasted the url ttps://na.artifactory.swg-devops.com/artifactory/api/npm/wcp-cos-de-npm-virtual/chai-as-promised into my browser and was prompted with a login. Is it possible I have the wrong URL set? If not that what could be causing this to hang?
I also tried running npm install --registry=https://registry.npmjs.org/ --verbose but it hangs here:
npm http fetch GET 200 https://registry.npmjs.org/chai-as-promised 25ms (from cache)
⸨ ░░░░░░░░░░░░░░░░⸩ ⠙ loadDep:tstest: sill pacote range manifest for chai-as-promised#^7.1.1 fetched in 50ms

You need to authenticate your npm client first.
See the heading Authenticating the Npm Client in this link
https://www.jfrog.com/confluence/display/RTF/Npm+Registry

npm config set loglevel info and then run npm i again
then restart the system.

Related

NPM: request to https://registry.npmjs.org/corepack failed, reason: connect EHOSTUNREACH

NPM used to work no problem but now for some reason anything I try to do that involves connecting to the registry times out.
The failure message I get from NPM is request to https://registry.npmjs.org/corepack failed, reason: connect EHOSTUNREACH 2606:4700::6810:1223:443
The command I'm running is npm update -g.
I'm on Arch Linux, and I installed the NPM package from arch. It is version 8.19.2 (the latest on arch).
I tried two DNS, the one I'm using now is Cloudflare (1.1.1.1).
Pinging "registry.npmjs.org" results in From 2600:1700:4630:c000::1 (2600:1700:4630:c000::1) icmp_seq=1 Destination unreachable: Address unreachable
But if I go to registry.npmjs.org in my web browser, I get the expected json result.
Any help is appreciated.
https://askubuntu.com/questions/32298/prefer-a-ipv4-dns-lookups-before-aaaaipv6-lookups/38468#38468
For some reason ipv6 requests are not working on my current network. I "solved" the issue for now by preferring ipv4 using the solution in the link above. Ultimately I'd like to find out why ipv6 is not working on my computer/network but for now this is fine.

Unable to start mongodb servise in ubantu failed to connect on Ubantu 20.04

I have tried all previous commands like
sudo chmod -R 0777 /var/lib/mongodb
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair
sudo service mongod start
sudo service mongod status
first command saying that file not availableand not removed
i also gave the all priveleges to it
sudo chown -R mongodb:mongodb /var/lib/mongodb
but its not showing any thing
also repairing commands not working
also restart ubantu but still not working
When debugging any problems with a service on Ubuntu try this:
# cat /var/log/messages
There you may find out more information about the problem.
Also, in your case mongod should be logging to a folder like
/var/log/mongod
Or something similar, and for that to happen the mongo user must have permissions to write there.
Allways look for the log, every service will log something either to their own file or to a system log. And hopefully, inside that log you’ll find the concrete problem that’s preventing your service from starting.

Hostname/IP doesn't match certificate's altnames

I'm working on a react native project and any attempt to install packages from npm fails with the error below.
fitz:tesseractOcrSample fitzmode$ npm i
npm ERR! request to https://registry.npmjs.org/react failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fitzmode/.npm/_logs/2018-09-01T13_08_53_778Z-debug.log
Looking at other solutions I have tried to set the strict-ssl to false in the npm config to no avail.
I have also tried using yarn instead but get the below.
fitz:tesseractOcrSample fitzmode$ yarn install
yarn install v1.7.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/react: getaddrinfo ENOTFOUND registry.yarnpkg.com registry.yarnpkg.com:443".
info If you think this is a bug, please open a bug report with the information provided in "/Users/fitzmode/Downloads/react-native-tesseract-ocr-master/tesseractOcrSample/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
I'm not sure if its a mis-configuration on my network or something else. Any solutions?
This works for me
I have edited my /etc/hosts file and create an entry like this
104.16.109.30 registry.npmjs.org
and it works.
SOLVED
I changed the DNS provider on my machine to OpenDNS. Apparently there may have been a misconfiguration on the npm registry that may be cached by my ISP.
In Preferences > Network > Advanced > DNS (Tab) , I've added 208.67.222.222 and 208.67.220.220 to the list of DNS servers.
More info here here
This works for me
Add
104.16.16.35 registry.yarnpkg.com
to /etc/hosts

installing NODEJS on remote AWS instance of Red Hat Enterprise Linux 7.1

I have been trying to install NODEJS on remote AWS instance of Red Hat Enterprise Linux 7.1
I had read some of the posts here and been on the node js website
I have tried t
curl --silent --location https://rpm.nodesource.com/setup | bash -
but then get the error
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
i even get this error if i run
sudo curl --silent --location https://rpm.nodesource.com/setup | bash -
I have also tried to change the permissions on that file but then it still doesnt install
Can someone suggest a better way / correct way of doing this?
Thanks
You just don't have permissions to install things. It doesn't matter you are running curl with sudo, because what really needs superuser permissions is the bash session inside which you run the script.
So, this would work.
curl --silent --location https://rpm.nodesource.com/setup | sudo bash -
At least on one of our ESXi RedHat virtual machines the easiest way I know to install nodejs is:
yum install epel-release
yum install nodejs
Let yum do all the heavy lifting :)
You may be running as a non root user.
Before running your actual curl command, run
sudo su
Then run (without sudo, since you are now running as root user)
curl --silent --location https://rpm.nodesource.com/setup | bash -

Trying to use meteor up on digital ocean

I have a digital ocean droplet that I am trying to deploy the most basic of meteor apps to, but I am getting a failing response. Any idea why this is happening?
UPDATE: added entire output
Anderss-iMac:microscope-deploy anderskitson$ mup deploy
Meteor-UP : Production Quality Meteor Deployments
--------------------------------------------------
Bundling Started: /Users/anderskitson/sites/microscope
Started TaskList: Deploying App
[bray.anderskitson.ca] uploading bundle
[bray.anderskitson.ca] uploading bundle: SUCCESS
[bray.anderskitson.ca] setting up env vars
[bray.anderskitson.ca] setting up env vars: SUCCESS
[bray.anderskitson.ca] invoking deployment process
[bray.anderskitson.ca] invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
Warning: Permanently added 'bray.anderskitson.ca,162.243.52.235' (RSA) to the list of known hosts.
npm WARN package.json http-proxy#1.0.0 No repository field.
npm http GET https://registry.npmjs.org/fibers
npm http 304 https://registry.npmjs.org/fibers
stop: Unknown instance:
bash: line 46: wait-for-mongo: command not found
-----------------------------------STDOUT-----------------------------------
> fibers#1.0.1 install /opt/meteor/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
fibers#1.0.1 node_modules/fibers
meteor start/running, process 10373
wait for mongo(5 minutes) to initiaze
----------------------------------------------------------------------------
Completed TaskList: Deploying App
I ran into same problem and I figured out that this command wasn't fired really well
sudo npm install -g forever userdown wait-for-mongo
and I manually did that so I can see wait-for-mongo a valid command,
see if that helps you too.

Categories

Resources