Build a declarative-style node tutorial, nodes are not showing up in the UI

Followed https://www.youtube.com/watch?v=OI6zHJ56eW0&t=187s, Tutorial: Build a declarative-style node | n8n Docs tutorials and did everything, but when I run n8n with n8n start the example nodes are not showing up in the UI.

I have cloned the GitHub - n8n-io/n8n-nodes-starter: Example starter module for custom n8n nodes., renamed in package.json, installed package with npm i, took the build with npm run build, the dist folder was created, then I ran npm link. and the module got listed in npm list -g.
Installed n8n globally using npm install -g n8n.
Navigated to n8n location (~/.nvm/versions/node/v18.20.3/lib/node_modules/n8n)
linked n8n-nodes-starter.

verified with npm list in n8n path, it lists

├── [email protected]
├── [email protected] extraneous →
├── [email protected]

ran n8n start and checked for the example node in the UI, could not find it there http://localhost:5678/workflow/new

There are no error messages, However when i tried to run npm link n8n-nodes-starter i get the following error,

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @langchain/[email protected]
npm error Found: @google-ai/[email protected]
npm error node_modules/@google-ai/generativelanguage
npm error   peerOptional @google-ai/generativelanguage@"^2.5.0" from [email protected]
npm error   node_modules/langchain
npm error     peerOptional langchain@"*" from [email protected]
npm error     node_modules/langsmith
npm error       langsmith@"~0.1.7" from [email protected]
npm error       2 more (@langchain/core, @langchain/community)
npm error     langchain@"~0.2.0" from @langchain/[email protected]
npm error     node_modules/@langchain/community
npm error       @langchain/community@"0.2.2" from @n8n/[email protected]
npm error       node_modules/@n8n/n8n-nodes-langchain
npm error         @n8n/n8n-nodes-langchain@"1.45.1" from the root project
npm error       1 more (the root project)
npm error     2 more (@n8n/n8n-nodes-langchain, the root project)
npm error   @google-ai/generativelanguage@"2.5.0" from @n8n/[email protected]
npm error   node_modules/@n8n/n8n-nodes-langchain
npm error     @n8n/n8n-nodes-langchain@"1.45.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @google-ai/generativelanguage@"^0.2.1" from @langchain/[email protected]
npm error node_modules/@langchain/community
npm error   @langchain/community@"0.2.2" from @n8n/[email protected]
npm error   node_modules/@n8n/n8n-nodes-langchain
npm error     @n8n/n8n-nodes-langchain@"1.45.1" from the root project
npm error   @langchain/community@"0.2.2" from the root project
npm error
npm error Conflicting peer dependency: @google-ai/[email protected]
npm error node_modules/@google-ai/generativelanguage
npm error   peerOptional @google-ai/generativelanguage@"^0.2.1" from @langchain/[email protected]
npm error   node_modules/@langchain/community
npm error     @langchain/community@"0.2.2" from @n8n/[email protected]
npm error     node_modules/@n8n/n8n-nodes-langchain
npm error       @n8n/n8n-nodes-langchain@"1.45.1" from the root project
npm error     @langchain/community@"0.2.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/akhil/.npm/_logs/2024-06-21T06_02_32_494Z-eresolve-report.txt

npm error A complete log of this run can be found in: /home/akhil/.npm/_logs/2024-06-21T06_02_32_494Z-debug-0.log

so I ran npm link n8n-nodes-starter --legacy-peer-deps, which ran without any issues.

Information on your n8n setup

  • n8n version: 1.45.1
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: ubuntu 20.0.6
  • node version : 18.20.3
  • npm version : 10.7.0

When I changed the node version to 16.20.2, and installed n8n version 0.190.0 just like in the video, it worked, I can see the nodes in the UI.

what can i do to make it work with the latest n8n version?

Hi @Akhil_Rajagopal_S, thanks for reaching out! I’m sorry you experienced these difficulties.

Could you provide the contents of your package.json file? You should also be sure to restart n8n if you didn’t already to ensure the configuration changes are applied.

Also look at previous discussions with community members who experienced the same thing:

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