Troubles with n8n installation

Hello there. I am trying to install n8n on Debian 10.6 globally, and getting a following error:

npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/bin/n8n -> /usr/lib/node_modules/n8n/bin/n8n

> sqlite3@4.2.0 install /usr/lib/node_modules/n8n/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.2.0 and node@14.13.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding' 
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.13.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/n8n/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/n8n/node_modules/sqlite3/.node-gyp'
gyp ERR! System Linux 4.19.0-11-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /usr/lib/node_modules/n8n/node_modules/sqlite3
gyp ERR! node -v v14.13.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/n8n/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1047:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 4.19.0-11-amd64
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/n8n/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/n8n/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN pg@8.4.1 requires a peer of pg-native@>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN pg@8.4.0 requires a peer of pg-native@>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

What’s wrong?

Welcome to the community @michael3m!

The problem does not seem to be related to the node.js version rather with the user you are trying to install n8n with. It has apparently not enough permissions. There are messages like permission denied or current user ("nobody") does not have permission.

Yes, I have noticed that. But I doubt, if there is an user, who has more rights than “root” - I tried to install a software being logged as root, “sudo su”…

Ah yes, but esp. root is not a great user to install things under and also causes problems.

If you google for that error message the first result which gets displayed is this:

Saying that the option --unsafe should be added. So you can try that when installing n8n.

Thanks, it helps.
But, in this case, another question is raised: in documentation said not more than

type npm install n8n -g
then type n8n start

that’s all. maybe, before you install this software, you must complete some list of prerequisites, not covered by manual? E.G. install npm, node.js, create a dedicated user etc?

Ah yes, it assumes that npm is installed.

If you want a real step-by-step guide on how to set up n8n on a server you can follow this guide:
https://docs.n8n.io/reference/server-setup.html#_3-install-docker-compose

Does this guide apply if I like to set up standalone instance, not using docker?

Do not know what you mean with a “standalone instance” but it does not use npm it uses docker.

But if you want to run n8n properly on a server that is the guide to follow. If not you have to figure out the most stuff yourself like setting up SSL, reverse-proxy, …

In case it is important for you to run with npm then simply google for a guide on how to install node.js and then run the npm command from above.

It means a software that is installed in “usual way”, like “apt install” or “setup.exe -> next -> next -> done”, not something like a preconfigured container like docker or an image for VmWare Player etc.

It is not a big problem, but, I think, the manual must at least mention about steps that are need to be done before install n8n. :slight_smile:
Thanks for the help though.

it means a software that is installed in “usual way”, like “apt install” or “setup.exe -> next -> next -> done”, not something like a preconfigured container like docker or an image for VmWare Player etc.

Hm, honestly both do not seem standalone or so different for me. No matter if the Node.js or Docker way you have to have either one or the other installed. So really standalone is neither of them. Only after we released the planned electron-version that would be standalone with no other requirements.

think, the manual must at least mention about steps that are need to be done before install n8n.

Yes agree, there is for sure still a lot of room for improvement!

And last (I hope) question: I have started n8n with a “–tunnel” option, added a telegram trigger and filled all needed credential for my existed telegram bot, and, when I trying to execute workspace (or trigger itself), I getting nothing - looks like webhook is died by timeout. Sending a message to the telegram bot by executing a regular telegram node (not trigger) works fine. Why could it be?

Please open in the future a new issue if it is not related to the original issue. Only like that can we be sure that if other users have the same problem they find the question and the solution.

The workflow is waiting for the webhook to be called. Meaning in this case that it is waiting for a Telegram-Message (or whatever you have configured the Telegram Trigger node to listen for). As soon as that event occurs the data will be displayed in the workflow.

Here a blog post that could be helpful:


If that event does not occur within 120 seconds it will time-out and stop automatically.
1 Like