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 ?
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
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.
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.
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.