Npm install n8n-nodes-my-custom-nodes throws error

While trying Setup to use n8n-nodes-module
command → npm install n8n-nodes-my-custom-nodes
console thowed an error:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/n8n-nodes-my-custom-nodes - Not found
Anybody have had the same issue?

Thank you very much in advance

You try to install an npm module that does not exist:
https://www.npmjs.com/package/n8n-nodes-my-custom-nodes
So 404 is the correct and expected response as it means that it can not find it.

You either have to publish the module npm publish (but then it becomes available for everybody worldwide) or you have to “publish it locally” with npm link.

I understand now,
the instruction npm install n8n-nodes-my-custom-modules should have the name of the folder where my custom modules are, right?

Thank you very much

No, please check the article I did link above.

You have to run npm link in the folder folder where the code of your custom node package can be found. If you have n8n globally installed it should theoretically already be able to find it.
If you have n8n installed in some kind of folder then you have to run npm link [package name] in the folder you have n8n npm installed. It should then theoretically find it on startup (honestly never used npm link much).

Sure you are right.
I am using the example node (n8n-nodes-starter) to try this, but the problem is that, after using npm link n8n-nodes-starter, and start n8n with npx n8n still dont find the package because folder dist is missing.

I am a bit stuck here.

Sounds for me like you did not build the node. Did you run npm run build?

yes… It says it doesn’t recognise ‘tsc’ as an insternal or external command

And installing typescript in that package when I use npm run build it says
error TS2688: Cannot find type definition file for ‘jest’.

Probably best if you try to install “jest” and “@types/jest”.

Hey @adricampi!

Do you want to create a custom node or a custom module? These are two different things. You can learn more here: Using the Node Dev CLI | Docs

If you’re interested in creating a node, I would suggest you go through the steps mentioned in the documentation here: Creating Your First Node | Docs

But if you want to build modules, we have covered the Development steps here: Using the Node Dev CLI | Docs

I have already created a couple of custom nodes, and they work fine. Now my objective is to create a module, to explore all the possibilities of n8n

1 Like

I’ll try that
Thanks