Installation

Hi,

I’m trying to install n8n on my cpanel but i got this error at build time:

[email protected] build /home/yy/xx/packages/node-dev
tsc

…/…/…/nodevenv/xxx/11/lib/node_modules/n8n-core/dist/src/Interfaces.d.ts:3:48 - error TS7016: Could not find a declaration file for module ‘request’. ‘/home/yy/nodevenv/xxx/11/lib/node_modules/n8n-core/node_modules/request/index.js’ implicitly has an ‘any’ type.
If the ‘request’ package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/request`

import { OptionsWithUri, OptionsWithUrl } from ‘request’;

Do you have an idea ?

Thanks

Julien
~~~~~~~~~

Welcome to the community @julien.latourbe!

Two things look wrong:

  1. The “node-dev” package is not needed at all to run n8n. So no need to build it in the first place.
  2. If you simply want to install n8n there should be no need to build n8n from source at all. You can use the n8n package we published.

Hi

Thanks Jan!

I understand that there is a better way to install n8n, but I contemplate writing my own modules so I need to be able to compile and deploy on my own server.

Ah if you want to create your own module and you want to build everything on your server there is probably no way around it.

Did you follow all the steps? Did you run for example the lerna command? Because for me everything seems to be building fine and that you will later use cpanel should probably not matter much yet as long as Node.js and everything else is properly installed. But have honestly not experience with cpanel except that people seem to have problems with it constantly.

Here are the steps I followed:

I switched to tag 0.75 because there was less errors from this version (I managed to make it work a few days ago):

git init .

git remote add origin https://github.com/n8n-io/n8n.git

git pull origin master

git fetch --all --tags

git checkout tags/[email protected] -b [email protected]

npm install -g lerna

lerna bootstrap --hoist

lerna exec npm run build

> [email protected] build /home/envoxoo/test.envoxoo.com/packages/editor-ui
> cross-env VUE_APP_PUBLIC_PATH="/%BASE_PATH%/" vue-cli-service build

 ERROR  Error loading vue.config.js:
 ERROR  Error: Cannot find module 'webpack/lib/Chunk'
Error: Cannot find module 'webpack/lib/Chunk'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/home/envoxoo/nodevenv/test.envoxoo.com/11/lib/node_modules/@beyonk/google-fonts-webpack-plugin/src/index.js:3:15)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `cross-env VUE_APP_PUBLIC_PATH="/%BASE_PATH%/" vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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 i

Did you manage to install n8n on cpanel ?