N8n install

I am trying to follow the tutorial in Tutorial: Build a declarative-style node | n8n Docs for creating my custom connector.

Describe the problem/error/question

installing n8n via npm install n8n -g does not work

What is the error message (if any)?

npm ERR! code 127
npm ERR! path /home/usr/.nvm/versions/node/v18.19.0/lib/node_modules/n8n/node_modules/@rudderstack/rudder-sdk-node
npm ERR! command failed
npm ERR! command sh -c npx patch-package
npm ERR! npm WARN exec The following package was not found and will be installed: patch-package@8.0.0
npm ERR! sh: 1: patch-package: not found

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @sallyde,

Welcome to the community :tada:

Can you try using the command below and let me know how you get on.

npm install -g --omit=dev n8n --ignore-scripts

Thanks for your reply @Jon .
npx n8n works just fine and runs the server.
however, npm install -g --omit=dev n8n --ignore-scripts does not run the server on http://localhost:5678/

any idea about why starter project does not work? I have created an issue for it here

Hey @sallyde,

I need to look into the starter project still. The npm install will install n8n then you can use n8n start to launch it.

For anyone else encountering this issue, it appears a fix has been created, which is awaiting release: https://github.com/n8n-io/n8n/pull/8568

The issue occurs due to a rudderstack postinstall script (specifically: rudderstack/rudder-sdk-node@2.0.6).

The following command:

npm install -g --omit=dev n8n --ignore-scripts

Will work but will obviously skip the various setup scripts, meaning you won’t be able to run “n8n start” out of the box.

The fastest solution I found is to install a downgraded version, by running the command:

npm install -g n8n@1.26.0

Issue should be resolved with release 1.27.3+