I try to install n8n on it via its virtual environment (like SSH) but it show below error.
Could you please help me?
Best regards;
/home/.../nodevenv/.../.../lib/bin/n8n -> /home/.../nodevenv/.../.../lib/lib/node_modules/n8n/bin/n8n
npm WARN lifecycle The node binary used for scripts is /home/.../nodevenv/.../.../bin/node but npm is using /opt/alt/alt-nodejs10/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] install /home/.../nodevenv/.../.../lib/lib/node_modules/n8n/node_modules/mmmagic
> node-gyp rebuild
make: Entering directory `/home/.../nodevenv/.../.../lib/lib/node_modules/n8n/node_modules/mmmagic/build'
CC(target) Release/obj.target/libmagic/deps/libmagic/src/apprentice.o
make: execvp: cc: Permission denied
make: *** [Release/obj.target/libmagic/deps/libmagic/src/apprentice.o] Error 127
make: Leaving directory `/home/.../nodevenv/.../.../lib/lib/node_modules/n8n/node_modules/mmmagic/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:193:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 2.6.32-954.3.5.lve1.4.63.el6.x86_64
gyp ERR! command "/opt/alt/alt-nodejs10/root/usr/bin/node" "/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/.../nodevenv/.../.../lib/lib/node_modules/n8n/node_modules/mmmagic
gyp ERR! node -v v10.17.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/...
Sorry no experience with cpanel and how they set up the environment and how Node.js runs in it.
The first line however:
/home/.../nodevenv/.../.../lib/bin/n8n -> /home/.../nodevenv/.../.../lib/lib/node_modules/n8n/bin/n8n
npm WARN lifecycle The node binary used for scripts is /home/.../nodevenv/.../.../bin/node but npm is using /opt/alt/alt-nodejs10/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
Thank you my frind
I try to install n8n according to your doc but unfortunately I see below error:
npm WARN lifecycle The node binary used for scripts is /home/mydir/nodevenv/n8n.mysite.com/10/bin/node but npm is using /opt/alt/alt-nodejs10/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] install /home/mydir/nodevenv/n8n.mysite.com/10/lib/node_modules/mmmagic
> node-gyp rebuild
node[435392]: pthread_create: Resource temporarily unavailable
gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
Hi, please look into this. I have tried to setup n8n on cPanel, but not able to do so due to this error. Or it will be great if you can share simple steps to follow for the same. The steps in the documentation do not work without error. Thanks
I managed to install n8n on cpanel, node.js 14.x, but don’t know what startup file to use in the node.js app to open it… anybody managed to successfully install and use n8n on cpanel hosting ?
Hi,
I haven’t done it recently. Try finding n8n file in node_modules/n8n/bin, that should be the startup file. As cpanel is quite similar to plesk you might find help here: https://github.com/n8n-io/n8n/issues/9
I’m trying too to install n8n via cPanel, but I don’t know what type on the “Application root” field (I can’t download files for n8n server and I don’t have the link to a repository). And same thing for “Application startup file”.
Hey guys! I know it’s been a super long time, but I just stumbled upon this thread, and I am running n8n on a shared hosting (not cPanel, but very similar, it uses PassengerPhusion to manage node apps just like cPanel).
Steps :
Create domain and relevant DNS config from xPanel
Create new node app from xPanel :
a. Select domain
b. Select working directory for the app files, any empty directory is good (“Application root”)
c. Startup file :node_modules/n8n/bin/n8n
Run npm init && npm install n8n inside the working directory (or create/update package.json with n8n as dependency and run install command from the UI)
When I connect to the server, I get a blank screen.
In the debug, I see that it doesn’t look for files in the right domain.
It looks in www.xxxx.fr instead of www.xxxx.fr/n8n as defined in the Cpanel.
I get so many errors and then crash when trying to install n8n with npm install n8n on Node.js version 22.14.0, but always different errors trying different versions of Node.js
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @n8n/[email protected]
npm warn Found: [email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain/node_modules/mongodb
npm warn mongodb@“6.11.0” from @n8n/[email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain
npm warn @n8n/n8n-nodes-langchain@“1.93.0” from [email protected]
npm warn node_modules/n8n
npm warn 1 more (@langchain/community)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional mongodb@“^5.8.0” from @n8n/[email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain/node_modules/@n8n/typeorm
npm warn @n8n/typeorm@“0.3.20-12” from @n8n/[email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/mongodb
npm warn peerOptional mongodb@“^5.8.0” from @n8n/[email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain/node_modules/@n8n/typeorm
npm warn @n8n/typeorm@“0.3.20-12” from @n8n/[email protected]
npm warn node_modules/@n8n/n8n-nodes-langchain
â ŹKilled
Probably be easier too. that’s how I installed it locally, but now I want to try to run it on my channel and don’t want to pay hostinger for another hosting plan just for this, although they do docker too. Now to see if there’s a way to install docker on my cpanel