N8N won't accept own packages


Can’t get a private npm package ( Gitlab repo package, needs npmrc file to download etc) in n8n. I tried to install it in my custom node as in the n8n repo.

tried installing/linking the private package in my node,
tried installing/linking the private package in the n8n folder,
tried exporting/setting NODE_FUNCTION_ALLOW_EXTERNAL =*

I’m missing something here and i dont know what exacly.

Without my private packages, n8n and the custom nodes work fine.

What is the error message (if any)?

Error loading node “NodeName” from: “C:\Users\user\AppData\Roaming\nvm\v16.16.0\node_modules\n8n\node_modules\n8n-nodes-starternode\dist\nodes\NodeName\NodeName.node.js” - ENOENT: no such file or directory, open ‘./keys/private.key’

The project just won’t launch

Information on your n8n setup

  • **n8n version: 0.213.0
  • **Database you’re using (default: SQLite):default
  • **Running n8n with the execution process [own(default), main]: default
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm i -g n8n => n8n start

Hey @Ilias_Ellouzati

Welcome to the community :raised_hands:

It looks like the issue is isn’t with n8n directly and more the node itself. The error suggests it can’t find a private key so I would maybe start by checking that and making sure the file exists or checking the path it is actually using.

@jon, thanks for the response.

Ill try that, if there is an example guide/video about using packages in custom nodes in n8n(runned with npm), i would love it !! have spend 2 days on this issue.

Hey @Ilias_Ellouzati,

No guide on using packages, We would follow whatever npm does as it is used to install the nodes. It could be that if the package is private as long as you can pull it when using the npm command you should be fine.

I have a feeling that the issue is not directly down to the package itself though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.