I clone the n8n 0.213.0 make pnpm install + build
i try to import workflow using the command line and I success
but if I zip all n8n and move it to different computer(in my case it’s aws instance)
and try to import I get error
Error: command import:workflow not found
@Asaf_Shay The error in the
import:workflow command seems unrelated to zipped files. It looks like the installed n8n on that machine has its node_modules folder modified. Can you please install n8n globally from the npm registry and try with that instead ?
what do you mean npm registry ?
An install from npm instead of copying over the build folder.
npm install -g n8n
the problem with that approach is, if that i need to npm i and npm build(and also add external packages) and this takes time, i want to save that time so i only need to download and run n8n
why the zip effect on the node module folder? the same project is running well when it’s on my local computer (meaning without zip)
Are you running it locally on your machine after unzipping it as well? I have seen very odd things happen when things are compressed like permissions being changed on files or some files being missed depending on how it was done.
What are you actually doing with n8n that requires this process? I would have thought building a docker image would be much easier and better for deployments.
the main purpose is to save time, when a customer makes an HTTP request to us we start the machine in amazon that starts n8n that starts a specific workflow for this customer, so to save time until now we zip n8n (after installing and build and add external packages) and when instance in amazon is up we download the specific zip.
until now we use the old version that uses lerna and part of the process was after I downloaded the zip I run in amazon
lerna bootstrap --hoist (because the zip and unzip was making trouble again)
but with the new version of n8n I don’t know what to do
If you had to run the lerna command before then at a guess you would need to run the pnpm commands again maybe just the install though.
It does sound like your workflow is the sort of thing containers would be very good at and it would save you some time on debugging issues that are not directly related to n8n.
it’s work, but it took time
i know i just don’t have time to investigate
since we migrated away from lerna+npm to turborepo+pnpm, there are many symbolic links in the
node_modules folder. It’s possible that zipping and unzipping is messing up with these symbolic links.
Do you have any idea how to fix it?
There isn’t really anything for us to fix here as it isn’t an issue with n8n and there is a solution involving running the command again.
You could try looking for a compression option that won’t remove the links but I strongly recommend looking into creating a custom docker image as it will probably be quicker for you.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.