How can I install npm packages in n8n?

Describe the problem/error/question

I am running the project using Node… like the npm from n8n itself.

What is the error message (if any)?

ERROR: Cannot find module ‘@databricks/sql’ [line 1]

Please share your workflow

Share the output returned by the last node

ERROR: Cannot find module ‘@databricks/sql’ [line 1]

Information on your n8n setup

  • n8n version: 1.18.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm

If you run n8n via non then you should be able to also simply npm install the library you need. Additionally would you have to set the environment variable NODE_FUNCTION_ALLOW_EXTERNAL accordingly to allow the node access to the library.


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