Hello everyone, I am very happy that there are already many articles about the Raspberry here. Unfortunately, my rehearsal is a little different. I have a PI4 8GB with an Ubuntu 20.10 64-bit system. I have seen that there are own images for it “Pi (n8n-pi)” but I would run n8n on the Ubuntu 20.10 64-bit system because I already have a good infrastructure here. Is it:
A) even possible? if so,
B) who has already had experience with it?
My problem is this:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/snap/node/3298/bin/node',
1 verbose cli '/snap/node/3298/bin/npm',
1 verbose cli 'install',
1 verbose cli 'n8n',
1 verbose cli '-g'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 8a5c2e30f9fc91d7
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly pacote directory manifest for undefined@file:n8n fetched in 37ms
8 timing stage:loadCurrentTree Completed in 103ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
12 silly install loadShrinkwrap
13 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
14 silly install loadAllDepsIntoIdealTree
15 timing stage:rollbackFailedOptional Completed in 1ms
16 timing stage:runTopLevelLifecycles Completed in 112ms
17 verbose stack Error: Can't install /home/jens/n8n: Missing package version
17 verbose stack at hasMinimumFields (/snap/node/3298/lib/node_modules/npm/lib/install/validate-args.js:28:15)
17 verbose stack at Array.<anonymous> (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
17 verbose stack at LOOP (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
17 verbose stack at chain (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
17 verbose stack at /snap/node/3298/lib/node_modules/npm/lib/install/validate-args.js:16:5
17 verbose stack at /snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
17 verbose stack at Array.forEach (<anonymous>)
17 verbose stack at /snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
17 verbose stack at Array.forEach (<anonymous>)
17 verbose stack at asyncMap (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
17 verbose stack at module.exports (/snap/node/3298/lib/node_modules/npm/lib/install/validate-args.js:15:3)
17 verbose stack at Array.<anonymous> (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
17 verbose stack at LOOP (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
17 verbose stack at chain (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
17 verbose stack at Installer.loadAllDepsIntoIdealTree (/snap/node/3298/lib/node_modules/npm/lib/install.js:483:3)
17 verbose stack at Array.<anonymous> (/snap/node/3298/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
18 verbose cwd /home/jens
19 verbose Linux 5.8.0-1011-raspi
20 verbose argv "/snap/node/3298/bin/node" "/snap/node/3298/bin/npm" "install" "n8n" "-g"
21 verbose node v12.19.0
22 verbose npm v6.14.8
23 error Can't install /home/jens/n8n: Missing package version
24 verbose exit [ 1, true ]
If anyone has any idea what the problem is, please let me know. 1000 thanks in advance
So, I have successfully installed n8n on RPi both on Raspian and also on Raspberry Pi OS. I have also successfully installed n8n on Ubuntu Server 20.04.
But, I have not attempted to combine the two of them. I am quite confident that this would work as the underlying infrastructure is essentially the same.
By the looks of it, you are attempting to install the application using the snap package management system. I would suggest possibly a different route. Give the following a try:
# Install dependencies
sudo apt update
sudo apt upgrade -y
sudo apt install build-essential python -y
# Update NodeJS 12 Source List and Install
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs -y
# Configure NodeJS global settings
cd ~
mkdir ~/.nodejs_global
npm config set prefix ~/.nodejs_global
echo 'export PATH=~/.nodejs_global/bin:$PATH' | tee --append ~/.profile
source ~/.profile
# Install n8n
npm install n8n -g
# Install and configure pm2
cd ~
npm install pm2@latest -g
pm2 start n8n
pm2 startup
# Execute the command that shows on the screen
# Save the pm2 configuration
pm2 save
This should be everything that you need to get n8n up and running on your system. It will even automatically restart on reboot.
Hello Tephlon, 1000 thanks for the very detailed instructions. I am very impressed. That certainly brought me a little further. I was able to follow the steps up to the following error. First the error from the console.
jens@jens-desktop:~$ npm install n8n -g
npm ERR! Can't install /home/jens/n8n: Missing package version
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jens/.npm/_logs/2021-01-26T13_09_27_582Z-debug.log
This is from the Log-File:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'n8n', '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session c7ca4f9462d2f766
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly pacote directory manifest for undefined@file:n8n fetched in 37ms
8 timing stage:loadCurrentTree Completed in 105ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
12 silly install loadShrinkwrap
13 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms
14 silly install loadAllDepsIntoIdealTree
15 timing stage:rollbackFailedOptional Completed in 1ms
16 timing stage:runTopLevelLifecycles Completed in 115ms
17 verbose stack Error: Can't install /home/jens/n8n: Missing package version
17 verbose stack at hasMinimumFields (/usr/lib/node_modules/npm/lib/install/validate-args.js:28:15)
17 verbose stack at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
17 verbose stack at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
17 verbose stack at chain (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
17 verbose stack at /usr/lib/node_modules/npm/lib/install/validate-args.js:16:5
17 verbose stack at /usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
17 verbose stack at Array.forEach (<anonymous>)
17 verbose stack at /usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
17 verbose stack at Array.forEach (<anonymous>)
17 verbose stack at asyncMap (/usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
17 verbose stack at module.exports (/usr/lib/node_modules/npm/lib/install/validate-args.js:15:3)
17 verbose stack at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
17 verbose stack at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
17 verbose stack at chain (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
17 verbose stack at Installer.loadAllDepsIntoIdealTree (/usr/lib/node_modules/npm/lib/install.js:483:3)
17 verbose stack at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
18 verbose cwd /home/jens
19 verbose Linux 5.8.0-1011-raspi
20 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "n8n" "-g"
21 verbose node v12.20.1
22 verbose npm v6.14.10
23 error Can't install /home/jens/n8n: Missing package version
24 verbose exit [ 1, true ]
@Tephlon, I hope this helps a little and we are very close to the goal.
Hello @Tephlon, in the end all the help and support worked well. It runs. Admittedly not on the Ubuntu OS as I would have liked, but as described by @Tephlon on the Raspberry OS. With this I can also find my peace.