Need help with testing custom node in dev container

Describe the problem/error/question

having trouble with testing my custom node created with the node-starter template, I’m using a dev container to run my local n8n instance, how do I test the custom node I created from the documentation tutorial? (the NASA pic one)

What is the error message (if any)?

can’t seem to make the tutorial in the documentation work

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.62.5
  • Database: Postgres (Docker from dev container)
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 11

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @azka-zaydan,

Welcome to the community :tada:

Can you be a bit more specific on what isn’t working?

hi Jon,

the npm link part, cant seem to get it to work cause the starter uses pnpm, and I’m still a bit confused on where I should run it.

here’s some added context:
starter template lives on folder A, I ran it, and tells me to use pnpm, but whenever I do that idk what params i should give it


image

I gave up on getting the npm link stuff to work and did this instead: Developing Custom Nodes for n8n with Docker - DEV Community There is a section in the article with some info about the npm vs pnpm vs link that may also help.

Ah yeah we really should update the guide to cover the pnpm commands, For the most part they are the same.

1 Like

When the time comes to update the guide, this issue on pnpm (still open as of Oct 2024) provides a bit of context on where things go wrong trying to use pnpm link instead of npm link - `pnpm link` in package dir:  ERR_PNPM_LINK_BAD_PARAMS  You must provide a parameter · Issue #4296 · pnpm/pnpm · GitHub

1 Like

@hubschrauber did you get it working, i started building one today and can’t follow the tutorial as i get a ton of error, plus i preffer to run in docker

@Wayne, there’s a link to a writeup (on dev.to) of how I got it working w/ Docker a few posts back. The TL/DR version (although the article isn’t very “L” anyway) is that instead of using any kind of filesystem link or npm feature, I’m just mapping a docker volume, directly to the custom-node-source/project directory on my workstation, to a .../.n8n/custom/... subpath in the n8n container.

docker-compose.yml

volumes:
      - /Users/myuserid/devstuff/custom_node_dev_project_1:/Users/node/.n8n/custom/node_modules/my-awesome-custom-node
      - /Users/myuserid/devstuff/custom_node_dev_project_abc:/Users/node/.n8n/custom/node_modules/my-other-custom-node

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