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?
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
Stop using canvas, or
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.