Amplify-cli: amplify publish needs "hosting add" and crashed when publish 2

Created on 26 Mar 2019  Â·  25Comments  Â·  Source: aws-amplify/amplify-cli

amplify publish

Please add hosting to your project before publishing your project
Command: amplify hosting add

amplify add hosting
Hosting is already fully enabled.

amplify remove hosting
No resources added for this category

This is updated version of CLI

bug code-gen investigating

Most helpful comment

@emeryaa Please delete the hosting folder in amplify/backend/hosting directory and try adding hosting using the CLI again.

All 25 comments

@emeryaa
I need more information to investigate this issue, please do the following:

  1. remove and reinstall your amplify CLI, to make sure it is not in a corrupted state:
$ npm remove -g @aws-amplify/cli
$ npm install -g @aws-amplify/cli
  1. take a screenshot of the folder structure in inside amplify/backend
  2. take a screenshot of the error messages logged on the terminal console.
  3. send the screenshots to me at [email protected]
  4. send the file amplify/backend/amplify-meta.json to me at [email protected]

@emeryaa Please delete the hosting folder in amplify/backend/hosting directory and try adding hosting using the CLI again.

Sorry for spam at other topics. I just dont understand who may delete my
issues about that. I will send you all info with screenshots within minutes.

On Wed, Mar 27, 2019 at 8:50 PM Kaustav Ghosh notifications@github.com
wrote:

@emeryaa https://github.com/emeryaa Please delete the hosting folder in
amplify/backend/hosting directory and try adding hosting using the CLI
again.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477250064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrv3QnvxA7692C-7DekQrMPhAeoCZks5va6FygaJpZM4cMg02
.

I had reinstall amplify and sent you data in the attach as you request

On Wed, Mar 27, 2019 at 8:55 PM Den Emeryanov emeryanov@gmail.com wrote:

Sorry for spam at other topics. I just dont understand who may delete my
issues about that. I will send you all info with screenshots within minutes.

On Wed, Mar 27, 2019 at 8:50 PM Kaustav Ghosh notifications@github.com
wrote:

@emeryaa https://github.com/emeryaa Please delete the hosting folder
in amplify/backend/hosting directory and try adding hosting using the CLI
again.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477250064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrv3QnvxA7692C-7DekQrMPhAeoCZks5va6FygaJpZM4cMg02
.

Delete hosting folder and add it again it helps. But how I can restore
settings of api and auth products? I need configure it manualy again? From
admin panel of aws? as I do it before, when I had crashed publish project
at time before?

At time before I had configure again facebook authorization, cognito auth.
api schema, api resolvers and etc. Reason of it. Crashed publish project
with amplify publish command at the CLI. and Cycle of errors with adde
hosting to the project.

On Wed, Mar 27, 2019 at 9:01 PM Den Emeryanov emeryanov@gmail.com wrote:

I had reinstall amplify and sent you data in the attach as you request

On Wed, Mar 27, 2019 at 8:55 PM Den Emeryanov emeryanov@gmail.com wrote:

Sorry for spam at other topics. I just dont understand who may delete my
issues about that. I will send you all info with screenshots within minutes.

On Wed, Mar 27, 2019 at 8:50 PM Kaustav Ghosh notifications@github.com
wrote:

@emeryaa https://github.com/emeryaa Please delete the hosting folder
in amplify/backend/hosting directory and try adding hosting using the CLI
again.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477250064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrv3QnvxA7692C-7DekQrMPhAeoCZks5va6FygaJpZM4cMg02
.

@emeryaa
I did not receive your emails.

New issue with execute codegen api. Screenshot attached

On Wed, Mar 27, 2019 at 9:12 PM Den Emeryanov emeryanov@gmail.com wrote:

Delete hosting folder and add it again it helps. But how I can restore
settings of api and auth products? I need configure it manualy again? From
admin panel of aws? as I do it before, when I had crashed publish project
at time before?

At time before I had configure again facebook authorization, cognito auth.
api schema, api resolvers and etc. Reason of it. Crashed publish project
with amplify publish command at the CLI. and Cycle of errors with adde
hosting to the project.

On Wed, Mar 27, 2019 at 9:01 PM Den Emeryanov emeryanov@gmail.com wrote:

I had reinstall amplify and sent you data in the attach as you request

On Wed, Mar 27, 2019 at 8:55 PM Den Emeryanov emeryanov@gmail.com
wrote:

Sorry for spam at other topics. I just dont understand who may delete my
issues about that. I will send you all info with screenshots within minutes.

On Wed, Mar 27, 2019 at 8:50 PM Kaustav Ghosh notifications@github.com
wrote:

@emeryaa https://github.com/emeryaa Please delete the hosting folder
in amplify/backend/hosting directory and try adding hosting using the CLI
again.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477250064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrv3QnvxA7692C-7DekQrMPhAeoCZks5va6FygaJpZM4cMg02
.

image

Delete API folder from backend and execute codegen is not helps

image

Structure of folders

image

how I can restore
settings of api and auth products?

I need to check your amplify-meta.json, backend-config.json, and team-provider-info.json files, please send them over through email so I can investigate this issue.

Please check it in attach

image

On Thu, Mar 28, 2019 at 12:17 AM UnleashedMind notifications@github.com
wrote:

I need to check your amplify-meta.json, backend-config.json, and
team-provider-info.json files, please send them over through email so I can
investigate this issue.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477330844,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrksggLFHXpwcaBRNgTiZdQNGL_oFks5va9HegaJpZM4cMg02
.

Any update here?

image

image

image

On Thu, Mar 28, 2019 at 12:46 AM Den Emeryanov emeryanov@gmail.com wrote:

Please check it in attach

On Thu, Mar 28, 2019 at 12:17 AM UnleashedMind notifications@github.com
wrote:

I need to check your amplify-meta.json, backend-config.json, and
team-provider-info.json files, please send them over through email so I can
investigate this issue.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-477330844,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrksggLFHXpwcaBRNgTiZdQNGL_oFks5va9HegaJpZM4cMg02
.

We will investigate this issue further, but for now, delete the file ".graphqlconfig.yml" and then run amplify codegen add --apiId <the-appsync-project-id>

It's not working. Just a shit! I spend my time to meet with that soft from amazon. and I have to pay money to amazon for his services! It s not fucking opensource garbage when you get it all for free. I just confuse that service like amazon have such silly errors at his software.
I spend my time to meet with that soft and I want working decision for that issue and I dont want to meet the CLI of other services.

as Amazon support team member you must to know how to make it work

If words has ends will start the war.

image

Hello @emeryaa . Sorry you're having difficulties. We want to help make you successful, however we do want all community members to communicate with each other and ask for help in a respectful manner. Please do be aware we have a Code of Conduct that should be followed: https://github.com/aws-amplify/amplify-cli/blob/master/.github/CODE_OF_CONDUCT.md

Please follow the following steps to get your API in the Amplify Project using the codegen command.

1) First delete the <amplify-project-root>/.graphqlconfig.yml file (This step is very crucial since this will get rid of your inconsistent project state)

2) Run amplify codegen add --apiId <the-appsync-project-id> (Please don't run any other command like amplify add codegen or amplify codegen before running this command)

If you're not successful with this command. Please let me know the contents of your <amplify-project-root> directory and your terminal logs so that I can further assist you.

Yes, but I too confuse why amazon have such silly errors with his soft. This make me some nervous.
Look, today to made modern a website for the world. I need to know JS, be able to project the db, know some of one backend language like a python,ruby, golang, php, need to know how to build apis, maybe later I need to know some additinal language for external fishes. And do I need to fight with such respectful service like amazon? Which it have a lot of services at his stack. And his CLI?? what is it?? Why it make me so nervous? Its basic functions! wtf??!

Yes, and Im not successful with this command. Its not working for me like I said before

this my files at the root directory

image

this like I execute commands in command line interface

image

I just newly execute amplify init then amplify codegen add --apiId <the-appsync-project-id>
Its not working for me!

Please update your software ASAP. I need to publish my website to aws. I want to pay my money to amazon and respectivly to you.

@emeryaa Sometimes you can't view .* files on your editor. So, I would recommend removing it from the terminal using rm .graphqlconfig.yml command from your project root and then running amplify codegen add --apiId <the-appsync-project-id>

Fuck that I had remove this file from directory. It not helps

On Sat, Mar 30, 2019 at 2:07 AM Kaustav Ghosh notifications@github.com
wrote:

@emeryaa https://github.com/emeryaa Sometimes you can't view .* files
on your editor. So, I would recommend removing it from the terminal using rm
.graphqlconfig.yml command from your project root and then running amplify
codegen add --apiId

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-cli/issues/1129#issuecomment-478164236,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTyrih3XdYEjphtgD-to-4S8FjgYCKFks5vbo6mgaJpZM4cMg02
.

amplify codegen remove
then
amplify codegen add --apiId

but api dont work with this configuration
[{"message":"Request failed with status code 401"}]

I have newly created auth and api. and manualy copy paste settings at admin panel of aws

Deleting amplify/backend/hosting and trying again, worked for me

Was this page helpful?
0 / 5 - 0 ratings