Good day.
My machine runs on windows 7 32 bit. I've installed Node.jS via installer from nodejs.org.
When i try to do anything with NPM http request involved, it just stalls. No errors, just continues on and on forever.
With try and error I came to conclusion it is the fault of my home router. I tried setting up DMZ, port forwarding on :80 but nothing helps. Maybe the port is wrong, but i can't find which one to forward.
I don't use proxy and have dynamic ip.
this is how it goes:
C:\Users\By-the-ocean\Desktop\delme>npm install -ddd express
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli '-ddd',
npm verb cli 'express' ]
npm info using npm#2.10.1
npm info using node#v0.12.4
npm verb install initial load of C:\Users\By-the-ocean\Desktop\delme\package.json
npm verb readDependencies loading dependencies from C:\Users\By-the-ocean\Desktop\delme\package.json
npm sill cache add args [ 'express', null ]
npm verb cache add spec express
npm sill cache add parsed spec { raw: 'express',
npm sill cache add scope: null,
npm sill cache add name: 'express',
npm sill cache add rawSpec: '',
npm sill cache add spec: '*',
npm sill cache add type: 'range' }
npm sill addNamed express#*
npm verb addNamed "*" is a valid semver range for express
npm sill addNameRange { name: 'express', range: '*', hasData: false }
npm sill mapToRegistry name express
npm sill mapToRegistry using default registry
npm sill mapToRegistry registry https://registry.npmjs.org/
npm sill mapToRegistry uri https://registry.npmjs.org/express
npm verb addNameRange registry:https://registry.npmjs.org/express not in flight;
fetching
npm verb request uri https://registry.npmjs.org/express
npm verb request no auth needed
npm info attempt registry request try #1 at 09:18:50
npm verb request id 50d2de54ad349278
npm http request GET https://registry.npmjs.org/express
/
A bit more details:
I'm on plain windows laptop connected to internet via router.
The request comes from the same machine to NPM servers (both http and https versions have been tried)
There is no way for me to connect without router directly via cabel.
Windows firewall has been turned off completely. no firewall on router either.
Related
I upgraded my npm to the latest version and now I can't run any npm command again, I uninstalled the node js and downloaded it again,
when I ran npm install -g ionic#latest I got this error in my command prompt:
npm WARN deprecated ionic#5.4.16: The Ionic CLI now uses ✨ #ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/env-paths failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\De Stone Of David\AppData\Roaming\npm-cache\_logs\2020-03-23T11_48_48_277Z-debug.log
I don't know what to do now, I also ran npm cache clean --force in powershell as admin and got the same error.
This is a case where reading the error message carefully can help. The key line is
npm ERR! network request to https://registry.npmjs.org/env-paths failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
ENOTFOUND is a message delivered by your OS to npm. It means npm's attempt to use the Domain Name Service (DNS) to look up that registry machine's hostname failed.
So, you have a networking-connectivity problem, or, less likely, a firewall problem. Try this on a command line on your machine.
curl https://registry.npmjs.org
If it, too, doesn't work, try rebooting your machine. If that doesn't work, ask a network engineer for help and mention the curl command as evidence of the problem.
Some home ISPs (I'm looking at you, Comcast) sometimes have connectivity trouble that shows up as DNS failures. Power-cycle your cable modem and router. If that doesn't help, call tech support and ask them to reset your modem remotely.
If you have a VPN in use try disconnecting from it, then try your npm operation again. If it works without the VPN, then ask the person who maintains the VPN for help.
I have no trouble getting to that hostname from my location.
I have https://packages.cloud.google.com/yum configured as a remote repo in Artifactory.
My repo file on Centos 7.3 looks like this:
[kubernetes]
name=kubernetes
baseurl=https://artifactory.company.com/artifactory/packages.cloud.google.com-yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
When I run yum install -y kubelet it prints this error:
e7a4403227dd24036f3b0615663a37 FAILED
https://artifactory.company.com/artifactory/packages.cloud.google.com-yum/repos/kubernetes-el7-x86_64/../../pool/e7a4403227dd24036f3b0615663a371c4e07a95be5fee53505e647fd8ae58aa6-kubernetes-cni-0.5.1-0.x86_64.rpm: [Errno 14] HTTPS Error 500 - Internal Server Error
Trying other mirror.
I am pretty sure the problem is the relative path in the URL: kubernetes-el7-x86_64/../../pool
If I wget the URL it works fine because wget is resolving out the relative path before sending the HTTP request, but yum does not do this and Artifactory returns a 500 when you give it a url with ../ in it. Does anyone know how to enable relative URLs in Artifactory? Or how to get yum to resolve URLs before sending the requests?
I am running these versions:
Artifactory 5.2.0
Yum 3.4.3-150
Update: This is the HTTP response body from artifactory:
{
"errors" : [ {
"status" : 500,
"message" : "Could not process download request: Path element cannot end with a dot: packages.cloud.google.com-yum-cache/repos/kubernetes-el7-x86_64/../"
} ]
}
The remote repository should be set with the following url in Artifactory
https://packages.cloud.google.com/yum/
The baseurl on the yum client should point on the repodata folder with the following:
baseurl=http://artifactory.company.com/artifactory/yum-remote/repos/kubernetes-el7-x86_64/
(The name of the remote repository is 'yum remote')
This should work without any further configuration from the Artifactory side.
The error you have mentioned regardin the relative path 'kubernetes-el7-x86_64/../../pool' happens during the caching of the artifact.
Artifactory cannot cache to a path which contains the '..' pattern so the request is failing.
It can be solved from Artifactory side with a user plugin.
If the path contains the '..' pattern then the plugin will modify the path where the artifact will cached so it will not include this pattern.
This is now redundant as the registry retrieves paths which doesn't include '..' in them.
I've been migrating to Firebase 3.0, and with the new changes, we have to use firebase serve on the CLI for local development, and I believe this defaults to port 5000. However, after going through the init process, running firebase serve doesn't do anything after "Starting Firebase development server..." even with specifying port 5000. Attempted fixes:
Tried with other ports, like 5001
Reinstalled Node (4.x and 6.x)
Reinstalled NPM
Removed firebase-cli (since firebase-tools is now being used)
Reinstalled firebase-tools with npm
Tweaked firebase init endlessly
Tried on different user accounts on my computer
Restarted computer
Checked that port 5000 was free by $lsof -i tcp:5000
Tested address variants like localhost:5000 and like 127.x and 192.x
Here is the debug log:
[debug] ----------------------------------------------------------------------
[debug] Command: /usr/local/bin/node /usr/local/bin/firebase serve -p 5000 --debug
[debug] CLI Version: 3.0.0
[debug] Platform: darwin
[debug] Node Version: v6.2.0
[debug] Time: Sun May 22 2016 01:29:59 GMT+0200 (CEST)
[debug] ----------------------------------------------------------------------
[debug]
[info] Starting Firebase development server...
[info]
[info] Project Directory: /Users/user/Documents/localdev/spfwork
Any thoughts on how to fix?
Thank you for your help.
Fixed - firebase serve from firebase-tools (npm) was missing a logger for some errors, which I added on a pull request here: https://github.com/firebase/firebase-tools/pull/143
My error was that localhost was not starting for some reason, so I changed the command to firebase serve -p 5000 -o 127.0.0.1, and specifying the listen port allowed the server to start successfully.
For reference, the error was Error: getaddrinfo ENOTFOUND localhost
You could just change your /etc/hosts file and use firebase serve normally.
To do this:
Launch Terminal
Type sudo nano /etc/hosts and press Return
Enter your admin password Paste
Paste
##
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
Save the file by pressing Ctrl + O
Exit with Ctrl + X
This should fix it.
See this for more
If Firebase cannot find the 'Public' folder, this error might show up. In that case, the error can be resolved by putting index.html and other static files and app assets of the website within the public folder, and executing firebase deploy at the Firebase CLI again.
I am experiencing failure every time I try to deploy to either an AWS/EC2 instance or a Digital Ocean droplet. With the EC2 instance I am using a pem file and with the droplet I am using password access. There were a lot of hoops to jump through to get through the mup setup, but that is finally successful on both instances. It's the mup deploy that fails on the Invoking deployment process: step.
Here's my mup.json for the droplet:
{
// Server authentication info
"servers": [
{
"host": "xx.xx.xx.xx",
"username": "root",
"password": "notmypassword"
// or pem file (ssh based authentication)
//"pem": "~/.ssh/id_rsa"
//"pem": "/users/alex/dropbox/awspems/projectmanager.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
"nodeVersion": "0.10.35",
// Install PhantomJS in the server
"setupPhantom": true,
// Application name (No spaces)
"appName": "projectmanager",
// Location of app (local directory)
"app": "/users/alex/dropbox/projectmanager",
// Configure environment
"env": {
"ROOT_URL": "http://xx.xx.xx.xx"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 30
}
The following messages appear whether in the EC2 instance or the droplet instance:
Claire-MacAir-7:projectmanager alex$ mup deploy
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Building Started: /users/notmyusername/dropbox/projectmanager
Started TaskList: Deploy app 'projectmanager' (linux)
[xx.xx.xx.xx] - Uploading bundle
[xx.xx.xx.xx] ✔ Uploading bundle: SUCCESS
[xx.xx.xx.xx] - Setting up Environment Variables
[xx.xx.xx.xx] ✔ Setting up Environment Variables: SUCCESS
[xx.xx.xx.xx] - Invoking deployment process
[xx.xx.xx.xx] ✘ Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
ir=/root/.node-gyp/0.10.35',
gyp info spawn args '-Dmodule_root_dir=/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
stop: Unknown instance:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
App did not pick up! Please check app logs.
-----------------------------------STDOUT-----------------------------------
LE(target) Release/obj.target/bcrypt_lib.node: Finished
COPY Release/bcrypt_lib.node
make: Leaving directory `/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/build'
> fibers#1.0.1 install /opt/projectmanager/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore#1.5.2 node_modules/underscore
semver#4.1.0 node_modules/semver
chalk#0.5.1 node_modules/chalk
├── escape-string-regexp#1.0.2
├── ansi-styles#1.1.0
├── supports-color#0.2.0
├── strip-ansi#0.3.0 (ansi-regex#0.2.1)
└── has-ansi#0.1.0 (ansi-regex#0.2.1)
eachline#2.3.3 node_modules/eachline
└── type-of#2.0.1
source-map-support#0.2.8 node_modules/source-map-support
└── source-map#0.1.32 (amdefine#0.1.0)
fibers#1.0.1 node_modules/fibers
Waiting for MongoDB to initialize. (5 minutes)
connected
projectmanager start/running, process 11786
Waiting for 30 seconds while app is booting up
Checking is app booted or not?
----------------------------------------------------------------------------
Completed TaskList: Deploy app 'projectmanager' (linux)
The project works perfectly with no errors on my localhost.
Any ideas?
Thanks in advance, Alex Adams
And the solution is:
The mup logs showed that it didn't like a path designated for a folder to hold uploaded files. I changed the app to use GridFS, thus storing the files in the database. The app deploys correctly now.
I need to install meteorite on a Mac. I am trying to install meteorite as shown below.
HOMEs-Mac-mini:~ home$ npm -v
1.4.9
HOMEs-Mac-mini:~ home$ node -v
v0.10.28
Then :
HOMEs-Mac-mini:~ home$ sudo -H npm install -g meteorite
The Outcome is :
npm http GET https://registry.npmjs.org/meteorite
npm http 304 https://registry.npmjs.org/meteorite
npm http GET https://registry.npmjs.org/ddp
npm http GET https://registry.npmjs.org/wrench
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/prompt
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rolling_timeout_exec
npm http 304 https://registry.npmjs.org/wrench
npm http 304 https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/ddp
npm http 304 https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/rolling_timeout_exec
npm http GET https://registry.npmjs.org/node-srp
npm http GET https://registry.npmjs.org/meteor-ejson
npm http GET https://registry.npmjs.org/faye-websocket
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/read
npm http GET https://registry.npmjs.org/revalidator
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/faye-websocket
npm http 304 https://registry.npmjs.org/node-srp
npm http 304 https://registry.npmjs.org/meteor-ejson
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/websocket-driver
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/revalidator
npm http 304 https://registry.npmjs.org/websocket-driver
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/cycle
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/i
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/cycle
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/eyes
/usr/local/bin/mrt -> /usr/local/lib/node_modules/meteorite/bin/mrt.js
> meteorite#0.7.4 postinstall /usr/local/lib/node_modules/meteorite
> sh ./completions/postinstall.sh
meteorite#0.7.4 /usr/local/lib/node_modules/meteorite
├── rolling_timeout_exec#0.0.1
├── colors#0.6.0-1
├── wrench#1.3.9
├── async#0.2.9
├── underscore#1.3.3
├── fstream#0.1.25 (inherits#2.0.1, graceful-fs#2.0.3, rimraf#2.2.8, mkdirp#0.3.5)
├── optimist#0.6.1 (wordwrap#0.0.2, minimist#0.0.10)
├── ddp#0.4.6 (meteor-ejson#0.6.3, node-srp#0.0.1, faye-websocket#0.7.2)
└── prompt#0.2.11 (revalidator#0.1.8, pkginfo#0.3.0, read#1.0.5, utile#0.2.1, winston#0.6.2)
after That :
HOMEs-Mac-mini:~ home$ meteor create appdemo
appdemo: created.
To run your new app:
cd appdemo
meteor
HOMEs-Mac-mini:~ home$ cd appdemo
Add Package using mrt below :
HOMEs-Mac-mini:appdemo home$ mrt add router
Here mrt not working gets error as shown below :
Stand back while Meteorite does its thing
✓ router
tag: https://github.com/tmeasday/meteor-router.git#v0.6.1
ERROR: 128 Command failed: fatal: Not a git repository (or any of the parent directories): .git
STDOUT:
STDERR: fatal: Not a git repository (or any of the parent directories): .git
/usr/local/lib/node_modules/meteorite/lib/sources/git.js:181
self.checkoutType + ": " + (self.commit || self.head);
^
There was a problem checking out tag: v0.6.1
HOMEs-Mac-mini:appdemo home$
I didn't get any idea about this.Can you please suggest me what to do?.
I used to have a setup where my developer account did not have the admin role. Sounds like a secure setup but I experienced only problems together with npm & sudo.
A temporary solution was to have a separate admin account and running all npm installs with this account, but that really sucks if you install a lot of packages.
After messing around for a while I finally uninstalled npm, upgraded my account with admin privileges and re-installed npm. No problems since then.