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

Unable to push - map is not a function #2365

Closed
idanlo opened this issue Sep 20, 2019 · 5 comments · Fixed by #2442
Closed

Unable to push - map is not a function #2365

idanlo opened this issue Sep 20, 2019 · 5 comments · Fixed by #2442
Assignees
Labels
bug Something isn't working

Comments

@idanlo
Copy link

idanlo commented Sep 20, 2019

Describe the bug
Randomly when pushing I get this error.
This happened while the push was already in progress and caused us to delete the entire stack because it had too many errors which made us lose about 20 users in our user pool, all our database data (which was backed up), all AppSync custom functions and all S3 files

(proj.inclues || []).map is not a function
An error occured during the push operation: (proj.includes || []).map is not a function

(by the way it is spelled occurred and not occured)

To Reproduce
Steps to reproduce the behavior:

  1. amplify push

Expected behavior
Should push changes to Amplify

Additional context
This happens on version 3.9.0, we downgraded to 3.0.0 and pushing works

@attilah
Copy link
Contributor

attilah commented Sep 20, 2019

@idanlo it is strange, since this issue is a duplicate of #2262 which was fixed back then.

Could you please share your yaml file in the root which has the structure you can see at the mentioned issue?

@attilah attilah added bug Something isn't working code-gen labels Sep 20, 2019
@idanlo
Copy link
Author

idanlo commented Sep 20, 2019

@attilah you are correct this was the issue. the path in the includes property was not correct.
Still, this error message needs to change to something else that will point the user to the yaml file.
We ended up deleting our Amplify environment and recreating it, but still thanks

yuth added a commit to yuth/amplify-cli that referenced this issue Sep 27, 2019
When a new API is added and if the api is pushed with yes flag (headless mode), then codegen fails
with error proj.inclues || []).map is not a function. Updated codegen to return a array of include
pattern when using headless mode

fix aws-amplify#2365
@mooser
Copy link

mooser commented Sep 28, 2019

I am also having this issue... I was originally getting the old "stackUpdate" error, but then I deleted my api and my functions that depend on the api, recreated them, ran amplify push:

✖ An error occurred when pushing the resources to the cloud

(proj.includes || []).map is not a function
An error occured during the push operation: (proj.includes || []).map is not a function

Which yml file should I be checking in?

This means I can't reliably get my project back up and running if I run into a stackupdate error while pushing.

@mooser
Copy link

mooser commented Sep 28, 2019

You know what? This has nothing to do with yml files in my case...

This issue is fixed for me in PR: #2442

kaustavghosh06 pushed a commit that referenced this issue Oct 2, 2019
When a new API is added and if the api is pushed with yes flag (headless mode), then codegen fails
with error proj.inclues || []).map is not a function. Updated codegen to return a array of include
pattern when using headless mode

fix #2365
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants