# Issues creating custom nodes

**URL:** <https://community.n8n.io/t/issues-creating-custom-nodes/81250>\
**Category:** Questions\
**Created:** [February 24, 2025, 10:18am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250 "2025-02-24T10:18:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [February 24, 2025, 10:18am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/1 "2025-02-24T10:18:37Z")

</div>

## Describe the problem/error/question

It’s close to impossible to create custom nodes.  
As described here, the official documentaiton is wrong: [https://www.youtube.com/watch?v=nX\_8OVhUVSY&ab\_channel=BenYoungAI](https://www.youtube.com/watch?v=nX_8OVhUVSY&ab_channel=BenYoungAI)

Additionnally, it seems impossible to fully install n8n with pnpm, as pnpm n8n gives me:  
Initializing n8n process  
There was an error initializing DB  
SQLite package has not been found installed. Try to install it: npm install sqlite3 --save

I have tried to install n8n with npm using:  
npm cache clean --force  
pnpm store prune  
rm -rf ~/.n8n

pnpm install n8n -g

## What is the error message (if any)?

Initializing n8n process  
There was an error initializing DB  
SQLite package has not been found installed. Try to install it: npm install sqlite3 --save

## Information on your n8n setup

- **n8n version:** n8n 1.79.3
- **Database (default: SQLite):** sqlite3
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Pnpm
- **Operating system:** Ubuntu in WSL2

---

<div class="post-metadata">

**Author:** ![Daniel\_Lamphere](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/daniel_lamphere/32/39212_2.png) [@Daniel\_Lamphere](https://community.n8n.io/u/Daniel_Lamphere)\
**Post date:** [February 24, 2025, 10:22am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/2 "2025-02-24T10:22:23Z")

</div>

It sounds frustrating to run into issues when trying to create custom nodes and install n8n! Let’s try to sort this out.

Regarding the custom nodes, the official documentation aims to guide you through the process, but it’s possible that some parts might be unclear or outdated. Could you specify which parts of the documentation ([2](https://docs.n8n.io/integrations/creating-nodes/overview/)) you are finding difficult to follow or believe are incorrect based on the YouTube video you mentioned? Knowing the specific points of confusion will help in addressing them and improving the documentation.

There are two main styles for creating nodes: declarative and programmatic. Are you trying to build a node using the declarative style ([3](https://docs.n8n.io/integrations/creating-nodes/build/declarative-style-node/)) or the programmatic style ([4](https://docs.n8n.io/integrations/creating-nodes/build/programmatic-style-node/))? Perhaps knowing which style you are attempting will help narrow down the issue.

As for the `sqlite3` error when installing n8n with pnpm, the error message “SQLite package has not been found installed. Try to install it: npm install sqlite3 --save” is indeed suggesting you use `npm` to install `sqlite3`.

While n8n itself can be installed and run using `pnpm`, it seems that for certain dependencies, especially those related to the database, `npm` might be expected or better supported.

Could you try installing `sqlite3` using `npm` as suggested by the error message, even if you are using `pnpm` for n8n itself? You can try running:

```bash
npm install sqlite3 --save

```

in your terminal after you encounter the error.

Alternatively, for a smoother installation experience, especially if you are new to n8n, you might want to try installing n8n globally using `npm` instead of `pnpm`. The official documentation primarily uses `npm` for installation instructions. You can install n8n with npm using:

```bash
npm install n8n -g

```

([5](https://docs.n8n.io/hosting/installation/npm/))

If you still encounter issues after trying these steps, please provide more details about:

- **Specific steps you are following from the documentation for custom nodes.**
- **Where exactly you are getting stuck or what seems incorrect.**
- **Whether you tried installing `sqlite3` with `npm`.**
- **If you are intentionally using `pnpm` for a specific reason, or if you are open to using `npm` for installation.**

The more information you can provide, the better I can assist you in resolving these issues!

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [February 24, 2025, 11:19am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/3 "2025-02-24T11:19:19Z")

</div>

Hi @Daniel_Lamphere, thank you so much for the quick answer.  
The part that is wrong in [the official documentation](https://docs.n8n.io/integrations/creating-nodes/build/declarative-style-node/) is simply 1. `npm link` that simply does not work, as mentionned in [https://www.youtube.com/watch?v=nX\_8OVhUVSY&ab\_channel=BenYoungAI](https://www.youtube.com/watch?v=nX_8OVhUVSY&ab_channel=BenYoungAI)

I get an UNSUPPORTED PROTOCOL, which hints at a conflict between npm & pnpm, because probably pnpm is the mandatory package manager in the package.json file, as per the master branch commits history.

I did try to completely remove n8n and resinstall it, both with npm & pnpm  
Trying to install sqlite3 with pnpm does not work: What did work was to:

1. Remove everhthing and reinstall n8n with npm
2. pnpm link (not npm) in ~/DEV/n8n-nodes-nasapics/nodes/NasaPics
3. In ~/.n8n/custom:

```auto
pnpm init
pnpm link NasaPics

```

Following which, I do see the custom node\_modules

~/.n8n/custom$ ls node\_modules/  
.pnpm/ .pnpm-workspace-state.json NasaPics/

But there is still nothing appearing in the UI when looking for “Pics”

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [February 26, 2025, 11:36am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/5 "2025-02-26T11:36:46Z")

</div>

Thanks again @Daniel_Lamphere

1. Restart does not work
2. I’ve started n8n in the terminal (n8n start, with n8n being in ~/.nvm/versions/node/v22.4.0/bin/n8n). No log is shown in the console
3. NasaPics.node.ts is the following:

```auto
import { INodeType, INodeTypeDescription } from 'n8n-workflow';

export class NasaPics implements INodeType {
	description: INodeTypeDescription = {
		// Basic node details will go here
		displayName: 'NASA Pics',
		name: 'NasaPics',
		icon: 'file:10865551.svg',
		group: ['transform'],
		version: 1,
		subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
		description: 'Get data from NASAs API',
		defaults: {
			name: 'NASA Pics',
		},
		inputs: ['main'],
		outputs: ['main'],
		credentials: [
			{
				name: 'NasaPicsApi',
				required: true,
			},
		],
		requestDefaults: {
			baseURL: 'https://api.nasa.gov',
			headers: {
				Accept: 'application/json',
				'Content-Type': 'application/json',
			},
		},
		properties: [
			{
				displayName: 'Resource',
				name: 'resource',
				type: 'options',
				noDataExpression: true,
				options: [
					{
						name: 'Astronomy Picture of the Day',
						value: 'astronomyPictureOfTheDay',
					},
					{
						name: 'Mars Rover Photos',
						value: 'marsRoverPhotos',
					},
				],
				default: 'astronomyPictureOfTheDay',
			},
			// Operations will go here
			{
				displayName: 'Operation',
				name: 'operation',
				type: 'options',
				noDataExpression: true,
				displayOptions: {
					show: {
						resource: [
							'astronomyPictureOfTheDay',
						],
					},
				},
				options: [
					{
						name: 'Get',
						value: 'get',
						action: 'Get the APOD',
						description: 'Get the Astronomy Picture of the day',
						routing: {
							request: {
								method: 'GET',
								url: '/planetary/apod',
							},
						},
					},
				],
				default: 'get',
			},
			{
				displayName: 'Operation',
				name: 'operation',
				type: 'options',
				noDataExpression: true,
				displayOptions: {
					show: {
						resource: [
							'marsRoverPhotos',
						],
					},
				},
				options: [
					{
						name: 'Get',
						value: 'get',
						action: 'Get Mars Rover photos',
						description: 'Get photos from the Mars Rover',
						routing: {
							request: {
								method: 'GET',
							},
						},
					},
				],
				default: 'get',
			},
			{
				displayName: 'Rover name',
				description: 'Choose which Mars Rover to get a photo from',
				required: true,
				name: 'roverName',
				type: 'options',
				options: [
					{name: 'Curiosity', value: 'curiosity'},
					{name: 'Opportunity', value: 'opportunity'},
					{name: 'Perseverance', value: 'perseverance'},
					{name: 'Spirit', value: 'spirit'},
				],
				routing: {
					request: {
						url: '=/mars-photos/api/v1/rovers/{{$value}}/photos',
					},
				},
				default: 'curiosity',
				displayOptions: {
					show: {
						resource: [
							'marsRoverPhotos',
						],
					},
				},
			},
			{
				displayName: 'Date',
				description: 'Earth date',
				required: true,
				name: 'marsRoverDate',
				type: 'dateTime',
				default:'',
				displayOptions: {
					show: {
						resource: [
							'marsRoverPhotos',
						],
					},
				},
				routing: {
					request: {
						// You've already set up the URL. qs appends the value of the field as a query string
						qs: {
							earth_date: '={{ new Date($value).toISOString().substr(0,10) }}',
						},
					},
				},
			},
			// Optional/additional fields will go here
			{
				displayName: 'Additional Fields',
				name: 'additionalFields',
				type: 'collection',
				default: {},
				placeholder: 'Add Field',
				displayOptions: {
					show: {
						resource: [
							'astronomyPictureOfTheDay',
						],
						operation: [
							'get',
						],
					},
				},
				options: [
					{
						displayName: 'Date',
						name: 'apodDate',
						type: 'dateTime',
						default: '',
						routing: {
							request: {
								// You've already set up the URL. qs appends the value of the field as a query string
								qs: {
									date: '={{ new Date($value).toISOString().substr(0,10) }}',
								},
							},
						},
					},
				],
			}

		]
	};
}

```

1. $ ls -alR ~/.n8n/custom/node\_modules/NasaPics  
lrwxrwxrwx 1 charlou charlou 57 Feb 24 11:38 $HOME/.n8n/custom/node\_modules/NasaPics → …/…/…/.local/share/pnpm/global/5/node\_modules/NasaPics

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [March 4, 2025, 5:50am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/7 "2025-03-04T05:50:57Z")

</div>

> [@Daniel\_Lamphere](#):
>
> `DEBUG=n8n:* n8n start`

Hi @Daniel_Lamphere it doesn’t help, unfortunately.  
Additional troubleshooting: My custom node is the simplest ever (and directly written from the tutorial). Furthermore, npm init is run in the .n8n/custom directory, not in the .n8n one

1. My package.json includes paragraphs you seem to have missed, namely:

```auto
  "devDependencies": {
    "@typescript-eslint/parser": "^7.15.0",
    "eslint": "^8.56.0",
    "eslint-plugin-n8n-nodes-base": "^1.16.1",
    "gulp": "^4.0.2",
    "prettier": "^3.3.2",
    "typescript": "^5.5.3"
  },
  "peerDependencies": {
    "n8n-workflow": "*"
  },
  "dependencies": {
    "NasaPics": "link:/home/charlou/DEV/n8n-nodes-nasapics/nodes/NasaPics"
  }

```

When running npm link inside DEV/n8n-nodes-nasapics, I get the following error:

```auto
~/DEV/n8n-nodes-nasapics$ npm link
npm error code 1
npm error path /home/charlou/DEV/n8n-nodes-nasapics
npm error command failed
npm error command sh -c npx only-allow pnpm
npm error ╔═════════════════════════════════════════════════════════════╗
npm error ║ ║
npm error ║ Use "pnpm install" for installation in this project. ║
npm error ║ ║
npm error ║ If you don't have pnpm, install it via "npm i -g pnpm". ║
npm error ║ For more details, go to https://pnpm.js.org/ ║
npm error ║ ║
npm error ╚═════════════════════════════════════════════════════════════╝
npm error npm warn exec The following package was not found and will be installed: only-allow@1.2.1
npm error A complete log of this run can be found in: /home/charlou/.npm/_logs/2025-03-04T05_46_30_301Z-debug-0.log

```

Inside detailed logs, I get:

```auto
19 info run n8n-nodes-nasapics@0.1.0 preinstall ../../../../../DEV/n8n-nodes-nasapics npx only-allow pnpm

```

Which clearly shows the incompatibility between package.json as on the master branch of n8n, and the command (npm link) to be run

That simply does not work

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [March 6, 2025, 11:08am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/8 "2025-03-06T11:08:32Z")

</div>

@Daniel_Lamphere FYI I’ve also tried the following after solving another “npm error code EUNSUPPORTEDPROTOCOL” error:

1. Checking the exact location where my n8n-nodes-nasapics is stored
2. Linking it manually in ~/.n8n/custom

```auto
$ ln -s /my/home/.nvm/versions/node/v22.4.0/lib/node_modules/n8n-nodes-nasapics n8n-nodes-nasapics

~/.n8n/custom$ ls -alht
total 16K
lrwxrwxrwx 1 charlou charlou 76 Mar 6 12:02 n8n-nodes-nasapics -> /my/home/.nvm/versions/node/v22.4.0/lib/node_modules/n8n-nodes-nasapics

```

After a n8n start, it still does not work

---

<div class="post-metadata">

**Author:** ![Gentleman9914](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@Gentleman9914](https://community.n8n.io/u/Gentleman9914)\
**Post date:** [March 6, 2025, 12:50pm UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/9 "2025-03-06T12:50:03Z")

</div>

Based on what I gathered around here, I found out that many people including me are struggling with custom nodes.

I created a [github repo](https://github.com/mathisgauthey/n8n-nodes-builder) to help out with it, allowing you to create your custom nodes and see them on the local n8n instance in a matter of a few clicks using VS Code devcontainers.

You can’t yet debug custom node using VS Code directly on the Typescript but I’m working on it. Feel free to land me a hand if you happen to know how Typescript building is working.

Edit : Debugging is now working, I just struggle with hot reload. Step by step I suppose 🕺

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [March 7, 2025, 5:52am UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/10 "2025-03-07T05:52:15Z")

</div>

@Gentleman9914 Thank you so much for your work  
I’m trying it, devcontainers are new to me and I encounter some errors, but I’ll let you know in issues directly on your repo

Thanks again

---

<div class="post-metadata">

**Author:** ![Grant\_Ammons](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/grant_ammons/32/60230_2.png) [@Grant\_Ammons](https://community.n8n.io/u/Grant_Ammons)\
**Post date:** [April 19, 2025, 12:13pm UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/11 "2025-04-19T12:13:25Z")

</div>

Just wanted to chime in here and echo all the things that OP mentioned. At some point, the developers decided to change from using `npm` to `pnpm` but neglected to update the documentation.

Additionally, I’ve been getting linting errors because the underlying implementation of declaring nodes has changed, but the linter rules haven’t been updated either. I’m currently stuck in an infinite loop with the values for `inputs` and `outputs` being either `['main']` or `[NodeConnectionType.Main]`, both of which are currently failing the linter.

These issues have been documented in the respective repos, but so far, no action has been taken. The net result is that trying to create a custom n8n node is currently impossible.

- [GitHub · Where software is built](https://github.com/ivov/eslint-plugin-n8n-nodes-base/issues)
- [GitHub · Where software is built](https://github.com/n8n-io/n8n-nodes-starter/issues) (see the multiple issues about the documentation being outdated / wrong)

---

<div class="post-metadata">

**Author:** ![charles\_ibrahim](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/charles_ibrahim/32/48332_2.png) [@charles\_ibrahim](https://community.n8n.io/u/charles_ibrahim)\
**Post date:** [April 19, 2025, 1:08pm UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/12 "2025-04-19T13:08:22Z")

</div>

Thanks for wrapping things up!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 18, 2025, 1:08pm UTC](https://community.n8n.io/t/issues-creating-custom-nodes/81250/13 "2025-07-18T13:08:47Z")

</div>

Closed on July 18, 2025, 1:08pm UTC

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