Custom-built node not appearing in local n8n instance

I’ve made a custom node for n8n but it’s not showing up in my local setup. I’m scratching my head trying to figure out why. Here’s what I’ve done so far:

  • Created an assistant.node.ts file with the node logic
  • Set up an assistant.node.json file for node info
  • Made an assistant.credentials.ts file for API authentication

I thought I followed all the steps, but when I check my local n8n instance, my new node is nowhere to be found. Any ideas on what I might be missing or how to troubleshoot this?

Here’s a simplified version of my main node file:

import { INodeType, INodeTypeDescription } from 'n8n-workflow';

export class CustomHelper implements INodeType {
    description: INodeTypeDescription = {
        displayName: 'Helper Bot',
        name: 'helperBot',
        icon: 'file:helper.svg',
        group: ['utility'],
        version: 1,
        description: 'Send a request to Helper Bot',
        inputs: ['main'],
        outputs: ['main'],
        credentials: [{ name: 'helperBotApi', required: true }],
        properties: [
            {
                displayName: 'Query',
                name: 'query',
                type: 'string',
                default: '',
                description: 'Enter your question',
            }
        ]
    };
}

Any help would be awesome!

Having developed custom nodes for n8n myself, I can suggest a few things to check.

First, ensure your node files are in the correct directory structure within your n8n installation. They should typically be in nodes/CustomHelper/.

Also, verify that your package.json includes the correct path to your compiled node file. It’s easy to miss this step.

Another common issue is forgetting to restart the n8n process after making changes. Always do a full restart to ensure your new node is loaded.

If you’re still having trouble, try running n8n in debug mode using n8n start --debug. This can provide valuable insights into why your node isn’t being recognized.

Lastly, double-check your node’s metadata in the JSON file. Sometimes a small typo there can prevent the node from appearing in the interface.

I’ve run into this issue before when developing custom nodes for n8n. One crucial step that’s often overlooked is registering the node in the package.json file. Make sure you’ve added your node to the n8nNodes section like this:

{
  "n8nNodes": [
    "dist/nodes/CustomHelper/CustomHelper.node.js"
  ]
}

Also, double-check that you’ve compiled your TypeScript files to JavaScript. Run npm run build in your project directory to generate the necessary .js files in the dist folder.

If you’ve done these steps and it’s still not showing up, try clearing your n8n cache. You can do this by deleting the .n8n folder in your home directory and restarting n8n.

Lastly, ensure your node’s class name matches the filename. In your case, the class is named CustomHelper, so the file should be CustomHelper.node.ts.

Hope this helps you troubleshoot the issue!

hey bob, have u tried cleaning ur n8n cache? sometimes that does the trick. also, make sure ur node files r in the right spot - usually in nodes/CustomHelper/. double check ur package.json too, it should point to the right compiled file. if none of that works, try runnin n8n in debug mode (n8n start --debug) to see whats goin on under the hood. good luck!