Unable to install n8n-nodes-module

I am trying to install n8n-nodes-module and I am getting the following error:

 npm install n8n-nodes-my-custom-nodes
    npm ERR! code E404
    npm ERR! 404 Not Found - GET https://registry.npmjs.org/n8n-nodes-my-custom-nodes - Not found
    npm ERR! 404
    npm ERR! 404  '[email protected]' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Kshitij.bharde\AppData\Roaming\npm-cache\_logs\2020-02-24T09_56_20_013Z-debug.log

That is expected. If you did not publish your module to npm it can not be found in the npm registry and can so not be installed.

So to make it work you have to add the package to your packages/cli/package.json and then either:

  • publish it to npm
  • add the code of your page to the “packages/” folder
  • update the file lerna.json with the path to your module

And then, no matter what of the above you do, you then have to run lerna bootstrap --hoist afterward.

Hi Jan, can you tell me how to add the package to package.json, I mean which part to edit or add.

Ah sure. That is very simple. You just add another line like this:

The important thing is that you give it the correct name (in your case apparently “n8n-nodes-my-custom-nodes”) and version number. If you did not change it “^0.1.0” should do.

Thanks Jan, I will try this out.