Unable to install Node Red

463 views
Skip to first unread message

Son Huynh

unread,
Mar 19, 2017, 7:38:29 PM3/19/17
to Node-RED
when i try to use sudo npm install -g --unsafe-perm node-red to install, i get the following message:


I've tried googling the answer for couple days and unable to get a solution. Please Help

Julian Knight

unread,
Mar 19, 2017, 8:59:03 PM3/19/17
to Node-RED
Some kind of error reaching the npm servers. You aren't the only one as a Google search will reveal.

Can you install anything else via npm? Is there are firewall blocking access? This is usually a proxy or firewall issue according to searches.


On Sunday, 19 March 2017 23:38:29 UTC, Son Huynh wrote:
when i try to use sudo npm install -g --unsafe-perm node-red to install, i get the following message:


Son Huynh

unread,
Mar 19, 2017, 9:29:09 PM3/19/17
to Node-RED
I've disabled firewalls and nothing works

Colin Law

unread,
Mar 20, 2017, 2:55:30 AM3/20/17
to node...@googlegroups.com
Could this be the virgin media issue again?

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/ed859ae0-d062-4262-80ac-99c90f2dff14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julian Knight

unread,
Mar 20, 2017, 5:00:03 AM3/20/17
to Node-RED
If you create a new folder and do something like "npm install moment", does that work? (you should be able to choose any module, moment was just one I could remember)

If you can't install any module and you've disabled the local firewall, that indicates a problem upstream. Either on your router or with your ISP.

What country and ISP are you in/with?

Son Huynh

unread,
Mar 20, 2017, 9:22:50 AM3/20/17
to Node-RED
I apologize, I'm very new to the raspberry pi. I'm not sure what you mean by that. Do i just type "npm install moment" at the command line? 

The full story is that i started using the default node red that is loaded into the Pi 3. It was missing the "Manage Palette" option so i tried to go and update node red using "update-nodejs-and-nodered". Everything went fine and it said operation was finished but node red never got installed back. Here is the full log file:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli '--unsafe-perm',
1 verbose cli 'node-red' ]
2 info using n...@3.10.10
3 info using no...@v6.10.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData node-red
8 silly fetchNamedPackageData node-red
9 silly mapToRegistry name node-red
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'node-red',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'node-red',
12 silly mapToRegistry name: 'node-red',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/node-red
14 verbose request uri https://registry.npmjs.org/node-red
15 verbose request no auth needed
16 info attempt registry request try #1 at 7:10:05 PM
17 verbose request id 80dd520c3a14581e
18 http request GET https://registry.npmjs.org/node-red
19 info retry will retry, error on last attempt: Error: connect EHOSTUNREACH 151.101.56.162:443
20 info attempt registry request try #2 at 7:10:27 PM
21 http request GET https://registry.npmjs.org/node-red
22 info retry will retry, error on last attempt: Error: connect EHOSTUNREACH 151.101.56.162:443
23 info attempt registry request try #3 at 7:11:38 PM
24 http request GET https://registry.npmjs.org/node-red
25 silly fetchPackageMetaData Error: connect EHOSTUNREACH 151.101.48.162:443
25 silly fetchPackageMetaData at Object.exports._errnoException (util.js:1022:11)
25 silly fetchPackageMetaData at exports._exceptionWithHostPort (util.js:1045:20)
25 silly fetchPackageMetaData at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
25 silly fetchPackageMetaData error for node-red { Error: connect EHOSTUNREACH 151.101.48.162:443
25 silly fetchPackageMetaData at Object.exports._errnoException (util.js:1022:11)
25 silly fetchPackageMetaData at exports._exceptionWithHostPort (util.js:1045:20)
25 silly fetchPackageMetaData at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
25 silly fetchPackageMetaData code: 'EHOSTUNREACH',
25 silly fetchPackageMetaData errno: 'EHOSTUNREACH',
25 silly fetchPackageMetaData syscall: 'connect',
25 silly fetchPackageMetaData address: '151.101.48.162',
25 silly fetchPackageMetaData port: 443 }
26 silly rollbackFailedOptional Starting
27 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: connect EHOSTUNREACH 151.101.48.162:443
30 verbose stack at Object.exports._errnoException (util.js:1022:11)
30 verbose stack at exports._exceptionWithHostPort (util.js:1045:20)
30 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
31 verbose cwd /home/pi
32 error Linux 4.4.50-v7+
33 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "--unsafe-perm" "node-red"
34 error node v6.10.0
35 error npm v3.10.10
36 error code EHOSTUNREACH
37 error errno EHOSTUNREACH
38 error syscall connect
39 error connect EHOSTUNREACH 151.101.48.162:443
40 error If you need help, you may report this error at:
40 error https://github.com/npm/npm/issues
41 verbose exit [ 1, true ]

Son Huynh

unread,
Mar 20, 2017, 9:37:08 AM3/20/17
to Node-RED
Sorry, I'm in the US with Xfinity


On Monday, March 20, 2017 at 4:00:03 AM UTC-5, Julian Knight wrote:

Julian Knight

unread,
Mar 20, 2017, 10:53:27 AM3/20/17
to Node-RED
Right. So you need a terminal (command line).

Firstly, is your version of Rasbian (the Pi OS) up to date? Run the following command:

sudo apt-get update && sudo apt-get upgrade

Then try this:

cd ~
mkdir test
cd test
npm install moment

You should get some warnings about package.json not existing but you should end up with a folder called "node_modules" that should contain a folder called "moment".

Can you also report back the output from the commands:

node --version
npm
--version
uname -a

Son Huynh

unread,
Mar 20, 2017, 4:59:37 PM3/20/17
to Node-RED
this is what I get:



This was done with all the firewall turned off

Son Huynh

unread,
Mar 20, 2017, 5:06:11 PM3/20/17
to Node-RED

I also this this message when try to install nodered

Son Huynh

unread,
Mar 20, 2017, 7:15:18 PM3/20/17
to Node-RED
Thanks for the help, I figured it out. Could not be ran using wifi and SSH. Hard-wired ethernet cable to the raspberry pi did the job.
Reply all
Reply to author
Forward
0 new messages