Configuration on git cloned project

Hi!
I’ve cloned n8n from github (following this instructions: n8n/CONTRIBUTING.md at master · n8n-io/n8n · GitHub).

It works! :slight_smile:

Now I don’t understand how to use and where I shuld put configuration file: Configuration | Docs.

Sorry but I’m new in node developing in this interesting progect.

Thank

What do you want to do with the cloned repository? Do you want to use it to developer for n8n or do you want to use to actually run n8n.

Hi Jan,

I want to develop a custom node also by using a private custom node module (for privacy guard).
My node should check marketing permission for a user_id in input.

By user_id, the node read from company db if permission allow to send marketing communications or not.

I’m trying to do it on localhost.
Maybe there is a better way?

Ah then you did everything right. There should be no need to set any of them. If you however really have to, you can simply set them as environment variables in the terminal you start n8n from. I hope that helps.

Yes, you help me a lot, but I’ve a lot of difficult to install private node mdule (for this I’va asked if clone progect is the right way).
Maybe it is another question if you want I change title or I do another question

My custom node works, but now I’m trying to install a private node module with lerna through:

lerna add @company/package-name --scope=nodes-base

In this way I shoul install a module to import inside my custom node, right?

In anyway lerna return this error:
lerna ERR! Error: 403 Forbidden - GET package-url
lerna ERR! at res.buffer.catch.then.body (/home/diego/n8n/n8n/node_modules/@evocateur/npm-registry-fetch/check-response.js:104:15)
lerna ERR! lerna 403 Forbidden - GET package-url

Can sombody hel me?

There should be nothing needed with lerna. You can simply install the package totally normal with npm install.
If it is not publish and the code in the same directory structure (under packages) you can simply add it as dependency in the package.json file of the “n8n-cli” package and then run lerna bootstrap --hoist again. It will then link everything correctly and on the next n8n launch it will load the nodes.

1 Like

Module installation returns no errors in build! :slight_smile:

I’ve install the npm module in pakages/nodes-base.
It works, but when i launch lerna bootstrap --hoist again the nodes-base/node_modules/mymodule becomes empty and the modules reamins only in node_modules root directory.

In anyway under node-base/package.json there is “mymodule” between the “dipendences”.

What do you mean with:
“add it as dependency in the package.json file of the “n8n-cli” package”

I should install my module in directory packages/cli?

Thank for all your help @jan

So you would do the following:

  1. Create your own n8n-nodes-package. Lets call it n8n-nodes-own and assume it has version 0.1.0 and make sure it is in a folder underneath packages/
  2. Build that package. So run npm run build in the same folder
  3. Add the following line to the dependencies of packages/cli/package.json:
        "n8n-nodes-own": "~0.1.0",
  1. Then run lerna boostrap --hoist
  2. Start n8n

Hi Jan!
thank for all your precious advices.
It works. :slight_smile:

2 Likes