I can't get the custom node in my n8n fork

Describe the problem/error/question

What is the error message (if any)?

I’m trying to create a custom node, considering I forked the project.
I have my project within the fork. I’ve tried linking it as the documentation says, but it doesn’t appear in the dashboard.
I tried another option: setting the path to my custom node project to an N8N_CUSTOM_EXTENSIONS environment variable, but it still doesn’t work.
I’ve already run the node with lint to validate errors and fixed them, but it still doesn’t work.

my structure is:

mi-fork-n8n
     nodes-custom/ n8n-nodes-ropoflow
package.json
dockerfile
.env
// rest of files

In my premises when I generate the link in my premises it looks like this (package.json):

"dependencies": {
    "n8n-nodes-ropoflow": "link:../../../Library/pnpm/global/5/node_modules/n8n-nodes-ropoflow",
    "tiktoken-node": "^0.0.7"
  }

I also tried putting the path to the node project inside

"dependencies": {
    "tiktoken-node": "^0.0.7",
    "n8n-nodes-ropoflow": "link:./nodes-custom/n8n-nodes-ropoflow"
  }

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.100.0
  • Database (default: postgres):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, pnpm):
  • Operating system: macos sequoia 15.5

Govind gave you a very chatgpt looking response, and my luck with chatgpt and deep n8n troubleshooting is mixed.

N8N_LOG_LEVEL=debug

I added some print and console.log lines to my scripts, it really helped identify the issues. even though it builds successfully, it can still have issues in execution and even just loading it in n8n.

The first thing I found when I was trying to make big changes in node examples was small things can break it completely, and I’ve rebuilt custom nodes more than once, section by section, to find out where things are breaking.

Add something before any import statements just to validate the module is loading correctly. When logging with debug, you can also see the nodes get loaded.

Make a copy, strip it down to basically no code in the execute part other than returning a response, and just one input. Keeping it simple like this make is easier to spot issues. This is NOT easy with TS, because you also have to remove the declarations for parts of the code you would be removing so that it builds OK. I repeat, this is not easy, but if it’s not loading and it is building OK, it could be difficult to figure out.

I can’t honestly say I actually found what was causing this issue for me, other than I must have had some syntax or something wrong somewhere.

Once the node itself is getting loaded, it might still have some issues with missing modules, so adding solid error handling and/or many print/console.log statements helps to find the problem.

I haven’t done the linking or custom extensions folder variables, I just put the dist/credentials/* files under the ~/.n8n/custom/credentials, and I create a new folder under ~/.n8n/custom/nodes and put the dist/nodes files under that. ~/.n8n is based on your implementation, it is the home directory of the account running the n8n process.

\cp ./dist/credentials/* /home/me/.n8n/custom/nodes/CustomNode && \cp ./dist/nodes/* /home/me/.n8n/custom/nodes/CustomNode

I did a lot of fiddling with the sample files to make everything work, but I did get it to work. Good luck!

1 Like