NPM error when installing Google Coder on Raspberry Pi

I am doing the following on Raspberry Pi to set up Google Coder:

sudo apt-get install nodejs npm git
git clone https://github.com/googlecreativelab/coder
cd coder/coder-base/
npm install

It works fine until I enter the fourth β€œnpm install” command when I do this to get the following errors:

npm ERR! Error: Failed to get from the registry: express / 3.1.0 npm ERR! at / usr / share / npm / lib / utils / npm -registry-client / get.js: 139: 12 npm ERR! on cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9) npm ERR! in Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18) npm ERR! in Request.callback (/usr/lib/nodejs/request/main.js:119:22) npm ERR! upon request. (/usr/lib/nodejs/request/main.js:212:58) npm ERR! in Request.emit (events.js: 88: 20) npm ERR! in ClientRequest. (/usr/lib/nodejs/request/main.js:209:10) npm ERR! at ClientRequest.emit (events.js: 67: 17) npm ERR! at CleartextStream.socketErrorListener (http.js: 1188: 9) npm ERR! at CleartextStream.emit (events.js: 67: 17) npm ERR! You can report this journal: npm ERR! http://bugs.debian.org/npm  npm ERR! or use npm ERR! reportbug --attach / home / pi / coder / coder-base / npm-debug.log npm npm ERR! npm ERR! System Linux 3.10.25+ npm ERR! command "/ usr / bin / nodejs" "/ usr / bin / npm" "install" "-g" npm ERR! cwd / home / pi / coder / coder-base npm ERR! node -v v0.6.19 npm ERR! npm -v 1.1.4 npm ERR! message could not be retrieved from the registry: express / 3.1.0 npm ERR! npm ERR! Additional registration information can be found at: npm ERR! /Home/pi/coder/coder-base/npm-debug.log npm is not normal

Then I tried working with "sudo npm install -g", which works for a longer time, but then crashes with the same error.

I also tried running "sudo npm config set registry http://registry.nmpjs.org/pi-gpio "

- ?

+4
2

pi, node/npm, apt-get, . wiki wiki debian wheezy ( ), ( ):

1. node:

sudo apt-get install python g++ make checkinstall fakeroot
src=$(mktemp -d) && cd $src
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
./configure
fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install
sudo dpkg -i node_*

2. npm:

curl https://www.npmjs.org/install.sh | sudo sh

.

+4

npm config set registry http://registry.npmjs.org/

+1

Source: https://habr.com/ru/post/1525709/


All Articles