Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows.map is not a function #9429

Closed
zhiru opened this issue May 16, 2024 · 2 comments
Closed

workflows.map is not a function #9429

zhiru opened this issue May 16, 2024 · 2 comments

Comments

@zhiru
Copy link

zhiru commented May 16, 2024

Bug Description

when executing for example n8n import:workflow --input=/home/node/.n8n/workflows/backups/RvOzh6w5dDiHnLgY.json

show me the errors:

~/.n8n/workflows/backups $ n8n import:workflow --input=/home/node/.n8n/workflows/backups/RvOzh6w5dDiHnLgY.json
User settings loaded from: /home/node/.n8n/config
An error occurred while importing workflows. See log messages for details.
workflows.map is not a function

To Reproduce

Install docker queue mode with worker and webhook, try to import workflow

Expected behavior

workflow imported with success

Operating System

Windows 11

n8n Version

1.41.1 (latest)

Node.js Version

latest

Database

SQLite (default)

Execution mode

queue

@netroy
Copy link
Member

netroy commented May 17, 2024

n8n import:workflow --input=file.json assumes that file.json contains an array of objects. This sounds like this file contains a single object, which would imply that it was either downloaded from the web/frontend, or was was exported with a --separate flag.

Can you please try either running n8n import:workflow --separate --input=/home/node/.n8n/workflows/backups to import all backups from that folder, or import this single workflow via the UI instead.

@zhiru
Copy link
Author

zhiru commented May 17, 2024

worked, thanks!!

@zhiru zhiru closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants