Bash script and Raspbian install issues again :(

Virgin Raspbian "Buster" install, 2019-09-26-raspbian-buster-full.zip. I setup OpenVINO and Coral Edgetpu support and verified that my AI code runs. My goal is to document the steps for my GitHub. All seems well.

Installed node-red using the bash script:

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

All seemed to go fine until I did node-red-start. It did four crash and restarts before giving up. Unfortunately I lost the error text I was planning to post when I I went to the node-red site to make sure I hadn't used the wrong version of the script. I hadn't.

Then I saw the blurb about may need to run sudo apt-get install build essentials.

I didn't explicitly install this, so I did, but seems the OpenVINO or TPU installation did it,

So I re-ran the script and things went from bad to worse.

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       โœ”
  Remove old version of Node-RED      โœ”
  Remove old version of Node.js       -
  Leave existing Node.js              โœ˜   Failed to install Node.js - Exit
  Clean npm cache                     
  Install Node-RED core               
  Move global nodes to local          
  Install extra Pi nodes              
  Npm rebuild existing nodes          
  Add shortcut commands               
  Update systemd script               
                                      

Any errors will be logged to   /var/log/nodered-install.log

sudo apt-get install npm fails:

$ sudo apt-get install npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 npm : Depends: nodejs (>= 6.11~) but it is not going to be installed
       Depends: node-abbrev (>= 1.1.1~) but it is not going to be installed

apt-get install nodejs gives:

sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (12.14.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Never seen such Debian fubar since the days of Knoppix!

Short of starting over anyone got any helpful hints on how to get node-red running?

I did:

sudo apt-get purge nodejs npm
and ran the bas script again.

Still didn't work, maybe this error means something to someone:

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       โœ”
  Remove old version of Node-RED      โœ”
  Remove old version of Node.js       โœ”  v0
  Update Node.js LTS                  โœ”   Node v12.14.1   Npm 6.13.4
  Clean npm cache                     โœ”
  Install Node-RED core               โœ”   
  Move global nodes to local          -
  Install extra Pi nodes              โœ”
  Npm rebuild existing nodes          -
  Add shortcut commands               โœ”
  Update systemd script               โœ”
                                      

Any errors will be logged to   /var/log/nodered-install.log
All done.
  You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
  Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started  Wed 22 Jan 2020 09:18:57 PM CST  -  Finished  Wed 22 Jan 2020 09:20:43 PM CST
type or paste code here

node-red-start gives:

$ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found
type or paste code here

I had dumping log files, but here is up until the first error happens (as far as I can tell):

t***************************************

Started : Wed 22 Jan 2020 09:18:57 PM CST
Running for user pi at /home/pi
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Now install nodejs
Updating nodejs 
Using nodesource.list
Removing nodejs v0

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'npm' 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.

## Installing the NodeSource Node.js 12.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 https://deb.nodesource.com/node_12.x buster InRelease
Hit:2 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists...

## Confirming "buster" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/buster/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK

## Creating apt sources list file for the NodeSource Node.js 12.x repo...

+ echo 'deb https://deb.nodesource.com/node_12.x buster main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_12.x buster main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 https://deb.nodesource.com/node_12.x buster InRelease
Hit:2 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists...

## Run `sudo apt-get install -y nodejs` to install Node.js 12.x 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



WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/15.5 MB of archives.
After this operation, 82.0 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 148570 files and directories currently installed.)
Preparing to unpack .../nodejs_12.14.1-1nodesource1_armhf.deb ...
Unpacking nodejs (12.14.1-1nodesource1) ...
Setting up nodejs (12.14.1-1nodesource1) ...
Processing triggers for man-db (2.8.5-2) ...
Now install Node-RED
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== integrity checksum failed when using sha512: wanted sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== but got sha512-m539ROQrklOM/ekYOK6bBm9XQl+wA5+/Ovj1THo3AElcUVNiVU9T+RWqkfEfrZnhhJqAtvTwTUES82qw1D3pgQ==. (158479 bytes)
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== (/root/.npm/_cacache/content-v2/sha512/b7/f5/2a68a8cbda39b856ac6d4e021afe86f1ce5217845c57f05d2725006024e0650e813ad5fd2d301a4b5ad1cb0481a94b2f2d8de10748d9764e81f5bbe31f2f)

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-23T03_19_52_847Z-debug.log
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio node-red-node-random node-red-node-ping node-red-contrib-play-audio node-red-node-smooth node-red-node-serialport :
ype or paste code here

And the npm log:

$ sudo cat /root/.npm/_logs/2020-01-23T03_19_52_847Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'i',
1 verbose cli   '-g',
1 verbose cli   '--unsafe-perm',
1 verbose cli   '--no-progress',
1 verbose cli   'node-red@latest'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.14.1
4 verbose npm-session dbd99a7c86b4db4b
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 warn registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== integrity checksum failed when using sha512: wanted sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== but got sha512-m539ROQrklOM/ekYOK6bBm9XQl+wA5+/Ovj1THo3AElcUVNiVU9T+RWqkfEfrZnhhJqAtvTwTUES82qw1D3pgQ==. (158479 bytes)
8 warn registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
9 silly fetchPackageMetaData error for node-red@latest Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== (/root/.npm/_cacache/content-v2/sha512/b7/f5/2a68a8cbda39b856ac6d4e021afe86f1ce5217845c57f05d2725006024e0650e813ad5fd2d301a4b5ad1cb0481a94b2f2d8de10748d9764e81f5bbe31f2f)
10 timing stage:rollbackFailedOptional Completed in 2ms
11 timing stage:runTopLevelLifecycles Completed in 888ms
12 verbose type system
13 verbose stack FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== (/root/.npm/_cacache/content-v2/sha512/b7/f5/2a68a8cbda39b856ac6d4e021afe86f1ce5217845c57f05d2725006024e0650e813ad5fd2d301a4b5ad1cb0481a94b2f2d8de10748d9764e81f5bbe31f2f)
13 verbose stack     at Readable.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:195:14)
13 verbose stack     at Readable.emit (events.js:223:5)
13 verbose stack     at /usr/lib/node_modules/npm/node_modules/make-fetch-happen/cache.js:92:30
13 verbose stack     at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
13 verbose stack     at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
13 verbose stack     at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)
13 verbose stack     at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:619:10)
13 verbose stack     at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:695:18)
13 verbose stack     at _drainQueueStep (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)
13 verbose stack     at _drainQueue (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
13 verbose stack     at Async._drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
13 verbose stack     at Immediate.Async.drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
13 verbose stack     at processImmediate (internal/timers.js:439:21)
14 verbose cwd /home/pi
15 verbose Linux 4.19.93-v7+
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "--unsafe-perm" "--no-progress" "node-red@latest"
17 verbose node v12.14.1
18 verbose npm  v6.13.4
19 error code EINTEGRITY
20 error errno EINTEGRITY
21 error Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== (/root/.npm/_cacache/content-v2/sha512/b7/f5/2a68a8cbda39b856ac6d4e021afe86f1ce5217845c57f05d2725006024e0650e813ad5fd2d301a4b5ad1cb0481a94b2f2d8de10748d9764e81f5bbe31f2f)
22 verbose exit [ 1, true ]

I have no clue as to what has gone wrong here. My AI code still runs fine so it seems that only node-red is hosed.

Odd - seems like it's having trouble reaching the npm host to check its cache is ok... maybe just a timing/internet/connection thing or maybe you need to flush the local cache npm cache clear --force

Did the npm cache clear --force and re-ran the script. Still no go.

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       โœ”
  Remove old version of Node-RED      โœ”
  Remove old version of Node.js       -
  Leave existing Node.js              -   Node v12.14.1   Npm 6.13.4
  Clean npm cache                     -
  Install Node-RED core               โœ”   
  Move global nodes to local          -
  Install extra Pi nodes              โœ”
  Npm rebuild existing nodes          -
  Add shortcut commands               โœ”
  Update systemd script               โœ”
                                      

Any errors will be logged to   /var/log/nodered-install.log
All done.
  You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
  Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started  Thu 23 Jan 2020 06:27:24 AM CST  -  Finished  Thu 23 Jan 2020 06:27:59 AM CST

To my casual eye, it would look like it should work, but it doesn't:

$ node-red-start

Node-RED is not yet fully installed
/usr/bin/node-red-start: line 91: update-nodejs-and-nodered: command not found

The error log is a lot shorter, but it seems to me to be the same problem:

***************************************

Started : Thu 23 Jan 2020 06:27:24 AM CST
Running for user pi at /home/pi
Found global nodes:   :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Already have nodejs v12.14.1
Now install nodejs
Now install Node-RED
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== integrity checksum failed when using sha512: wanted sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== but got sha512-m539ROQrklOM/ekYOK6bBm9XQl+wA5+/Ovj1THo3AElcUVNiVU9T+RWqkfEfrZnhhJqAtvTwTUES82qw1D3pgQ==. (158479 bytes)
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== (/root/.npm/_cacache/content-v2/sha512/b7/f5/2a68a8cbda39b856ac6d4e021afe86f1ce5217845c57f05d2725006024e0650e813ad5fd2d301a4b5ad1cb0481a94b2f2d8de10748d9764e81f5bbe31f2f)

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-23T12_27_34_242Z-debug.log
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio node-red-node-random node-red-node-ping node-red-contrib-play-audio node-red-node-smooth node-red-node-serialport :
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-serialport@0.10.0
+ node-red-node-smooth@0.1.2
+ node-red-node-random@0.1.4
+ node-red-node-ping@0.1.0
+ node-red-node-pi-gpio@1.0.6
+ node-red-contrib-play-audio@2.4.0
updated 6 packages and audited 129 packages in 8.198s
found 0 vulnerabilities

Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.
Finished : Thu 23 Jan 2020 06:27:24 AM CST

looking in /root/.npm/_logs/2020-01-23T12_27_34_242Z-debug.log I see:

7 warn registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== integrity checksum failed when using sha512: wanted sha512-t/UqaKjL2jm4VqxtTgIa/obxzlIXhFxX8F0nJQBgJOBlDoE61f0tMBpLWtHLBIGpSy8tjeEHSNl2ToH1u+MfLw== but got sha512-m539ROQrklOM/ekYOK6bBm9XQl+wA5+/Ovj1THo3AElcUVNiVU9T+RWqkfEfrZnhhJqAtvTwTUES82qw1D3pgQ==. (158479 bytes)
8 warn registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.

Does this mean the npmjs.org site is broken or hacked?

1 Like

Which exact Hardware are you using.
Hopefully I can try here later.

RaspberryPi 3B+

Raspbian: 2019-09-26-raspbian-buster-full.zip
with post install sudo apt-get update ; sudo apt-get upgrade

I moved the sd card to a Pi4B-2GB it booted and the Python AI ran fine. I've never had issues installing node-red on a Pi before. I've had issues with installing node-red the Coral Mendel TPU development board and some other versions of Linux, but the Pi has up to now just never been a problem.

1 Like

so you moved the card rather than did clean install on Pi4 ?
They are different processors so the card may not move happily... (eg you can't move card from Pi2 to Pi1 etc )

It was a virgin install to the SD card and I did all the installation and upgrades on a Pi3B+

I moved the card to the Pi4B just for grins, and to test the "universial-ness" of Raspbian Buster.

They have all the device tree overlays in /boot so moving cards across models should now work. The Pi4 broke this for "Stretch" and they never supported the Pi4 before Buster.

My AI is usable with the Pi3B and "Onvif snapshot" cameras or the PiCamera module, I'm eventually planning a few Pi3 vs. Pi4 test runs for my GitHub README.md.

Are you able to install node-red manually?
sudo npm -g --unsafe-perm node-red

Nope

I get the same error:

npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/node-red:

I'm stumped unless there is an issue at registry.npmjs.org, in which case there is nothing I can do about it.

I have just checked doing the same here without issue, so it is not a global problem. Whilst waiting for @dceejay to return, see if you can npm install anything. So go into your .node-red directory (make one if it is not already there) and run
npm install node-red-contrib-something
where something is a node you will eventually want (or any other node for that matter, you can always remove it again later).

I'm repeating the fresh install on a different SD card. I will install node-red as soon as the initial upgrade completes.

Your suggestion is something I was going to do after installing node-red:

/* AI "in alert region" filter.
 Install point-in-polygon with:
    cd ~/.node-red
    npm install point-in-polygon
 var inside = require('point-in-polygon'); // doesn't work in node-red.
 So must edit .node-red/settings.js and add:
      functionGlobalContext: {
          insidePolygon:require('point-in-polygon')
      }
 Requires a node-red restart when finished.
*/

I need this for a node-red filter function to use the location of the detected person within the frame to decide to alert or not. I could do it in the python, but its easier to modify/tweak in the node-red as the AI doesn't need to be restarted. Making multiple rtsp connections is pretty time consuming, typically 6-10 seconds per camera. Paralleling them with Python processes instead of threads cuts it down dramatically but the IPC overhead of processes compared to thread significantly reduces thruput.

Node-red installed and started up fine on my repeat install to a different SD card.

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       โœ”
  Remove old version of Node-RED      โœ”
  Remove old version of Node.js       โœ”
  Install Node.js LTS                 โœ”   Node v12.14.1   Npm 6.13.6
  Clean npm cache                     โœ”
  Install Node-RED core               โœ”   1.0.3 
  Move global nodes to local          โœ”
  Install extra Pi nodes              โœ”
  Npm rebuild existing nodes          -
  Add shortcut commands               โœ”
  Update systemd script               โœ”
                                      

Any errors will be logged to   /var/log/nodered-install.log
All done.
  You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
  Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started  Thu 23 Jan 2020 11:56:40 AM CST  -  Finished  Thu 23 Jan 2020 12:07:32 PM CST

pi@raspberrypi:~ $ node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.2.213:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
23 Jan 12:10:06 - [info]
Welcome to Node-RED
===================
23 Jan 12:10:06 - [info] Node-RED version: v1.0.3
23 Jan 12:10:06 - [info] Node.js  version: v12.14.1
23 Jan 12:10:06 - [info] Linux 4.19.93-v7+ arm LE
23 Jan 12:10:07 - [info] Loading palette nodes
23 Jan 12:10:10 - [info] Settings file  : /home/pi/.node-red/settings.js
23 Jan 12:10:10 - [info] Context store  : 'default' [module=memory]
23 Jan 12:10:10 - [info] User directory : /home/pi/.node-red
23 Jan 12:10:10 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Jan 12:10:10 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
23 Jan 12:10:10 - [info] Creating new flow file
23 Jan 12:10:10 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
23 Jan 12:10:10 - [info] Server now running at http://127.0.0.1:1880/
23 Jan 12:10:10 - [info] Starting flows
23 Jan 12:10:10 - [info] Started flows

I'm still mystified as to what went wrong with the previous install and how it got so fubar despite everything else apparently working correctly.

I've rebooted with the original fubar SD card and a npm install seems to have worked correctly:

Last login: Thu Jan 23 10:28:42 2020
[setupvars.sh] OpenVINO environment initialized
pi@raspberrypi:~ $ cd .node-red
pi@raspberrypi:~/.node-red $ npm install point-in-polygon
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ point-in-polygon@1.0.1
added 1 package from 1 contributor and audited 130 packages in 3.693s
found 0 vulnerabilities

Manually installing node-red with sudo npm install -g --unsafe-perm node-red still fails :frowning:

npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/node-red: Integrity verification failed for sha512

I'm stumpped!

To close this out, I believe the issue was a bad SD card (Samsung brand, go figure.)

I repeated my installation on a different card and all went smoothly. Wasn't a total loss as the repeat let me verify and improve my instructions for setting up a Pi3/4 to run my AI system.

I cloned the good card to the bad with dd and the Samsung card worked fine for a little while then certain things just stopped working. The entire system became unusable, not just node-red. The lack of any visible error messages was disconcerting!

Wasted a good bit of time by assuming a "brand name" SD card couldn't be defective in a weird way :frowning:

1 Like