Skip to content

Instantly share code, notes, and snippets.

@erossignon
Created August 10, 2020 20:16
Show Gist options
  • Save erossignon/f916326e9ee51374f42bfa2e317ce38f to your computer and use it in GitHub Desktop.
Save erossignon/f916326e9ee51374f42bfa2e317ce38f to your computer and use it in GitHub Desktop.
$ ssh pi@raspberrypi
pi@raspberrypi's password:
Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Aug 10 18:37:26 2020
Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Aug 10 18:37:26 2020
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# cd .node-red/
root@raspberrypi:/home/pi/.node-red# ls -al
total 256
drwxr-xr-x 4 pi pi 4096 août 9 19:55 .
drwxr-xr-x 21 pi pi 4096 août 9 18:23 ..
-rw-r--r-- 1 pi pi 19888 août 9 19:55 .config.json
-rw-r--r-- 1 pi pi 19890 août 7 20:44 .config.json.backup
-rw-r--r-- 1 pi pi 100 août 7 17:37 flows_raspberrypi_cred.json
-rw-r--r-- 1 pi pi 72 août 7 17:33 .flows_raspberrypi_cred.json.backup
-rw-r--r-- 1 pi pi 4165 août 7 21:05 flows_raspberrypi.json
-rw-r--r-- 1 pi pi 3925 août 7 21:03 .flows_raspberrypi.json.backup
drwxr-xr-x 3 pi pi 4096 août 7 17:26 lib
drwxr-xr-x 321 pi pi 12288 août 7 20:44 node_modules
-rw-r--r-- 1 pi pi 235 août 7 20:44 package.json
-rw-r--r-- 1 pi pi 154967 août 7 20:44 package-lock.json
-rw-r--r-- 1 pi pi 12610 août 7 17:26 settings.js
root@raspberrypi:/home/pi/.node-red# whoami
root
root@raspberrypi:/home/pi/.node-red# npm install --unsafe-perm node-red-contrib-opcua
npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
o..................] | loadIdealTree:loadAllDepsIntoIdealTree: sill install loadIdealTree
[..................] / fetchMetadata: sill removeObsoleteDep removing [email protected] from the tree as its been replaced by a new
> [email protected] postinstall /home/pi/.node-red/node_modules/node-opcua-client
> node test_helpers/create_certificates.js certificate -s -o certificates/client_selfsigned_cert_2048.pem
Creating default g_config file /home/pi/.node-red/node_modules/node-opcua-client/certificates/config.js
> [email protected] postinstall /home/pi/.node-red/node_modules/node-opcua-server
> node test_helpers/create_certificates.js certificate -s -o certificates/server_selfsigned_cert_2048.pem
Creating default g_config file /home/pi/.node-red/node_modules/node-opcua-server/certificates/config.js
> [email protected] postinstall /home/pi/.node-red/node_modules/node-opcua-server-discovery
> npm run certificate
npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
> [email protected] certificate /home/pi/.node-red/node_modules/node-opcua-server-discovery
> node test_helpers/create_certificates.js certificate -s -o certificates/server_selfsigned_cert_2048.pem
Creating default g_config file /home/pi/.node-red/node_modules/node-opcua-server-discovery/certificates/config.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
+ [email protected]
added 71 packages from 25 contributors, removed 1 package and updated 13 packages in 630.637s
root@raspberrypi:/home/pi/.node-red#
@erossignon
Copy link
Author

Doing

pi@raspberrypi:~/.node-red $ npm i
npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

Btw, npm seems out of date, let fix it

npm install -g npm

@erossignon
Copy link
Author

Argh !!!

pi@raspberrypi:~/.node-red $ npm install -g npm
npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN checkPermissions Missing write access to /usr/local/lib
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-08-10T20_20_25_208Z-debug.log

@erossignon
Copy link
Author

try again

sudo npm install -g npm

arg !!!

pi@raspberrypi:~/.node-red $ npm install -g npm  --unsave-perm                                    
npm WARN npm npm does not support Node.js v10.21.0                                                
npm WARN npm You should probably upgrade to a newer version of node as we                         
npm WARN npm can't make any promises that npm will work with this version.                        
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.               
npm WARN npm You can find the latest version at https://nodejs.org/                               
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm                 
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules                     
npm ERR! path /usr/local/lib/node_modules/npm                                                     
npm ERR! code EACCES                                                                              
npm ERR! errno -13                                                                                
npm ERR! syscall access                                                                           
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm'               
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm']          
npm ERR!   stack:                                                                                 
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm\'',       
npm ERR!   errno: -13,                                                                            
npm ERR!   code: 'EACCES',                                                                        
npm ERR!   syscall: 'access',                                                                     
npm ERR!   path: '/usr/local/lib/node_modules/npm' }                                              
npm ERR!                                                                                          
npm ERR! The operation was rejected by your operating system.                                     
npm ERR! It is likely you do not have the permissions to access this file as the current user     
npm ERR!                                                                                          
npm ERR! If you believe this might be a permissions issue, please double-check the                
npm ERR! permissions of the file and its containing directories, or try running                   
npm ERR! the command again as root/Administrator (though this is not recommended).                
                                                                                                  
npm ERR! A complete log of this run can be found in:                                              
npm ERR!     /home/pi/.npm/_logs/2020-08-10T20_23_16_876Z-debug.log                               
pi@raspberrypi:~/.node-red $ sudo chmod -R a+rw /usr/local/lib/node_modules/npm                   
sudo chmod -R a+rw /usr/local/lib/node_modules
sudo chmod -R a+rw /usr/local/lib/node_modules/npm
sudo chmod -R a+rw /usr/local/bin
npm install -g npm 

Hourra !


npm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment