Blynk + raspberry pi project

Hello,
I am making a schoolproject and i want to use a raspberry pi with blynk for this. I already have a raspberry pi but when i want to intall Node.js its give me an error message. I am following this link. But at this step:
pi@raspberrypi:/ $ npm -v3.10.10
its give me an error. Is there someone that know what the problem is or is the installation guide outdated?

npm -v3.10.10 is not the command… This is the command… npm -v

The rest was an example of the resulting version

yes i know but when i give the command npm -v ist gives me an error.

You implied something different…

Please clarify the exact steps leading up to this and exact errors… we don’t read minds :stuck_out_tongue_winking_eye:

ok sorry, this is what I did:

> pi@raspberrypi:~ $ sudo apt-get purge node nodejs node.js -y
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> Note, selecting 'node-json-localizer' for regex 'node.js'
> Note, selecting 'node-json-stable-stringify' for regex 'node.js'
> Note, selecting 'node-jsv' for regex 'node.js'
> Note, selecting 'node-jsonstream' for regex 'node.js'
> Note, selecting 'node-jsdom' for regex 'node.js'
> Note, selecting 'node-jsesc' for regex 'node.js'
> Note, selecting 'node-json-stringify-safe' for regex 'node.js'
> Note, selecting 'node-json5' for regex 'node.js'
> Note, selecting 'node-jscoverage' for regex 'node.js'
> Note, selecting 'node-js-yaml' for regex 'node.js'
> Note, selecting 'node-jssip' for regex 'node.js'
> Note, selecting 'node-jsonminify' for regex 'node.js'
> Note, selecting 'node-jsonselect' for regex 'node.js'
> Note, selecting 'node-jsonfile' for regex 'node.js'
> Note, selecting 'node-jsonparse' for regex 'node.js'
> Note, selecting 'node-jsonify' for regex 'node.js'
> Note, selecting 'node-js-tokens' for regex 'node.js'
> Note, selecting 'node-json-parse-helpfulerror' for regex 'node.js'
> Note, selecting 'node-jsconfig' for regex 'node.js'
> Package 'node-jscoverage' is not installed, so not removed
> Package 'node' is not installed, so not removed
> Package 'node-js-tokens' is not installed, so not removed
> Package 'node-js-yaml' is not installed, so not removed
> Package 'node-jsconfig' is not installed, so not removed
> Package 'node-jsdom' is not installed, so not removed
> Package 'node-jsesc' is not installed, so not removed
> Package 'node-json-localizer' is not installed, so not removed
> Package 'node-json-parse-helpfulerror' is not installed, so not removed
> Package 'node-json-stable-stringify' is not installed, so not removed
> Package 'node-json-stringify-safe' is not installed, so not removed
> Package 'node-json5' is not installed, so not removed
> Package 'node-jsonfile' is not installed, so not removed
> Package 'node-jsonify' is not installed, so not removed
> Package 'node-jsonminify' is not installed, so not removed
> Package 'node-jsonparse' is not installed, so not removed
> Package 'node-jsonselect' is not installed, so not removed
> Package 'node-jsonstream' is not installed, so not removed
> Package 'node-jssip' is not installed, so not removed
> Package 'node-jsv' is not installed, so not removed
> Package 'nodejs' is not installed, so not removed
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> pi@raspberrypi:~ $ sudo apt-get autoremove
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> pi@raspberrypi:~ $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
> 
> ## Installing the NodeSource Node.js 6.x LTS Boron repo...
> 
> 
> ## Populating apt-get cache...
> 
> + apt-get update
> Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
> Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
> Hit:3 https://deb.nodesource.com/node_6.x stretch InRelease
> Reading package lists... Done
> 
> ## Confirming "stretch" is supported...
> 
> + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/stretch/Release'
> 
> ## Adding the NodeSource signing key to your keyring...
> 
> + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
> OK
> 
> ## Creating apt sources list file for the NodeSource Node.js 6.x LTS Boron repo...
> 
> + echo 'deb https://deb.nodesource.com/node_6.x stretch main' > /etc/apt/sources.list.d/nodesource.list
> + echo 'deb-src https://deb.nodesource.com/node_6.x stretch main' >> /etc/apt/sources.list.d/nodesource.list
> 
> ## Running `apt-get update` for you...
> 
> + apt-get update
> Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
> Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
> Hit:3 https://deb.nodesource.com/node_6.x stretch InRelease
> Reading package lists... Done
> 
> ## Run `sudo apt-get install -y nodejs` to install Node.js 6.x LTS Boron and npm
> ## You may also need development tools to build native addons:
>      sudo apt-get install gcc g++ make
> ## To install the Yarn package manager, run:
>      curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
>      echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
>      sudo apt-get update && sudo apt-get install yarn
> 
> 
> pi@raspberrypi:~ $ sudo apt-get update && sudo apt-get upgrade
> Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
> Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
> Hit:3 https://deb.nodesource.com/node_6.x stretch InRelease
> Reading package lists... Done
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> Calculating upgrade... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> pi@raspberrypi:~ $ sudo apt-get install build-essential nodejs -y
> Reading package lists... Done
> Building dependency tree        
> Reading state information... Done
> build-essential is already the newest version (12.3).
> The following additional packages will be installed:
>   libc-ares2 libhttp-parser2.8 libuv1 nodejs-doc
> The following NEW packages will be installed:
>   libc-ares2 libhttp-parser2.8 libuv1 nodejs nodejs-doc
> 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0 B/5,087 kB of archives.
> After this operation, 22.2 MB of additional disk space will be used.
> Selecting previously unselected package libc-ares2:armhf.
> (Reading database ... 80764 files and directories currently installed.)
> Preparing to unpack .../libc-ares2_1.14.0-1~bpo9+1_armhf.deb ...
> Unpacking libc-ares2:armhf (1.14.0-1~bpo9+1) ...
> Selecting previously unselected package libhttp-parser2.8:armhf.
> Preparing to unpack .../libhttp-parser2.8_2.8.1-1~bpo9+1_armhf.deb ...
> Unpacking libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
> Selecting previously unselected package libuv1:armhf.
> Preparing to unpack .../libuv1_1.18.0-3~bpo9+1_armhf.deb ...
> Unpacking libuv1:armhf (1.18.0-3~bpo9+1) ...
> Selecting previously unselected package nodejs.
> Preparing to unpack .../nodejs_8.11.1~dfsg-2~bpo9+1_armhf.deb ...
> Unpacking nodejs (8.11.1~dfsg-2~bpo9+1) ...
> Selecting previously unselected package nodejs-doc.
> Preparing to unpack .../nodejs-doc_8.11.1~dfsg-2~bpo9+1_all.deb ...
> Unpacking nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
> Setting up nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
> Setting up libuv1:armhf (1.18.0-3~bpo9+1) ...
> Processing triggers for libc-bin (2.24-11+deb9u3) ...
> Processing triggers for man-db (2.7.6.1-2) ...
> Setting up libc-ares2:armhf (1.14.0-1~bpo9+1) ...
> Setting up libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
> Setting up nodejs (8.11.1~dfsg-2~bpo9+1) ...
> update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
> Processing triggers for libc-bin (2.24-11+deb9u3) ...
> pi@raspberrypi:~ $ node --version
> v8.11.1
> pi@raspberrypi:~ $ npm -v
> bash: npm: command not found
>

sudo apt-get install npm

then retry

Ok thank you now it is working, but when I now enter my auth key this happened:
code: ‘ECONNREFUSED’,
errno: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘xxx.xx.xxx.xxx’,
port: 8441 }

This port has been replaced with 9443. you will need to change it in the library. Search this forum as that has been referenced a few times already.

https://community.blynk.cc/search?q=8441%20nodejs%20order%3Alatest