Custom node not found

I made a custom node and uploaded it to npm an hour ago i can download it in my console
npm install n8n-nodes-arabictext

but when I try adding it to n8n I get

Error installing new package

Error loading package “n8n-nodes-arabictext” :npm package not found

is there a time to wait?

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 @alisaw11 , manke sure to have N8N_COMMUNITY_PACKAGES_ENABLED and N8N_REINSTALL_MISSING_PACKAGES set to true.

didn’t work
I can install it in my local n8n instance but can’t in my hosted docker container

I’m assuming that the error message is incorrect, and the npm installation is failing because one or more of the 355 dependencies needs to run some sort of a post-installation script that does not work on alpine.
I’m curious though, why does this package have more dependencies than n8n itself? is that intentional?

it is not intentional I just don’t know what I am doing

I see that you already updated the package.json. Can you also please remove n8n-workflow from dependencies, and put it back in devDependencies and peerDependencies, with version set to either * or 1.x, like the starter repo does.

I just noticed that you are using the canvas package, which does not ship pre-compiled binaries for alpine/musl. So when you try to install your package in a n8n docker container, canvas tries to compile from source, but because the container image doesn’t have many of the build related packages installed, npm install fails.

Your only options are to either

  1. Stop using canvas, or
  2. Create a custom docker image with all the build tooling, to be able to compile canvas

PS: Option 2 might work for you, but no one else will be able to install your package on their n8n docker containers running the official image.

For Option 1, you could switch to gm, since n8n already ships with it.

gm doesn’t work with Arabic text that why I want to use canvas

gm has issues with RTL, but maybe this solution works?

I tried this workflow, and the rendering for arabic definitely still has issues, specially with the diacritics, but maybe you can fix it.

image

2 Likes

thank you so much i worked like a charm

image

Diacritics are not important in Arabic.

1 Like

That’s good to hear.

Today I learnt. I’m only familiar with Urdu, where they are indeed very important :sweat_smile:.

I haven’t tested it yet, but this might also be a helpful package to fix the rendering for Arabic, Farsi, and possible Urdu.

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