amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Can't use the amplify cli anymore... validatetypenamereservedwords, useexperimentalpipelinedtransformer in the cli.json file blocking it. with issue.

Open idobleicher opened this issue 6 years ago • 26 comments

Describe the bug After I added the API, the local cli.json file blocking me from working with Amplify. it has an object with 3 keys which 2 of which causing the amplify to crush.

image image

it's blocking me from using the CLI. and I can't take any actions and work with Amplify like that. I commented them out, but I can't use some features and delete environments because of them.

To Reproduce I have just added an API to my project with Graphql. I am using windows 10. my teammates using a mac (on mac it's work good.)

Expected behavior Not to crush...

Screenshots image image

idobleicher avatar Nov 24 '20 14:11 idobleicher

if you need me to provide more information just write :) but it's a big issue. I can't work with that current situation. (I don't think this issue happen only to me but...)

idobleicher avatar Nov 24 '20 14:11 idobleicher

Transferring this issue to Amplify CLI as this seems to be related to CLI vs JavaScript. cc @renebrandel for visibility

sammartinez avatar Nov 24 '20 17:11 sammartinez

@iuyt9003 Which amplify version are you using?

ammarkarachi avatar Nov 24 '20 18:11 ammarkarachi

V4.34.0 and V4.30.0 I tried on both @ammarkarachi

idobleicher avatar Nov 24 '20 22:11 idobleicher

any update maybe? I can't work now. this is really an issue. CLI is blocked for any command.

idobleicher avatar Nov 25 '20 17:11 idobleicher

Hi @iuyt9003

Maybe I am wrong here but as posted in image above, Can you put a comma after addmissingownerfields flag. Let me know if that works?

akshbhu avatar Nov 25 '20 19:11 akshbhu

Hey @akshbhu it's working when I put a comment on the 2 others. validatetypenamereservedwords, useexperimentalpipelinedtransformer

the addmissingownerfields does not intrrupt. but I can't use some of the features of the CLI (kind of blocked).

idobleicher avatar Nov 26 '20 10:11 idobleicher

I'm having the same issue. Works on my machine (MacOS), but build fails on Amplify Console, we cannot deploy our web app

idanlo avatar Nov 26 '20 11:11 idanlo

@iuyt9003 What do you mean by you can't use some features? you would have more traction explaining clearly what is it that was desired and what was the outcome to get your issue resolved.

ammarkarachi avatar Nov 29 '20 22:11 ammarkarachi

Hey @ammarkarachi , yes of course. I am only able to use the CLI when I put a comment out these flags. but some of the features I use with the CLI even if I comment them out still getting the error. example deleting env.

idobleicher avatar Nov 30 '20 01:11 idobleicher

@iuyt9003 What's the delete error?

ammarkarachi avatar Nov 30 '20 02:11 ammarkarachi

@iuyt9003

Maybe I am wrong here but as posted in image above, Can you put a comma after addmissingownerfields flag. Let me know if that works?

Just to be sure we meant the word 'comma' not 'comment'

Can you use the following json in your cli.json file and try it out?

{
  "features": {
    "graphqltransformer": {
      "addmissingownerfields": true,
      "validatetypenamereservedwords": true,
      "useexperimentalpipelinedtransformer": false
    }
  }
}

ammarkarachi avatar Nov 30 '20 22:11 ammarkarachi

@ammarkarachi this is not working : P, I meant comment out, this it's working but I have still limits on the CLI actions I can do. image Added a picture of how I configure it for now to use some of the CLI features.

idobleicher avatar Dec 01 '20 13:12 idobleicher

image Full image display

idobleicher avatar Dec 01 '20 13:12 idobleicher

any news? I am almost fully blocked from working

idobleicher avatar Dec 07 '20 11:12 idobleicher

I have nearly the same error, but I face this issue when I am trying to deploy the app on amplify.

Everytime the command "amplifyPush --simple" runs I get this JSONValidator error (see image attached)

Because of this I can't push my project and deploy it all. I am not sure why this is happening, but im certain that "graphqltransformer" is coming from the cli.json file, it keeps having an issue with what is written on that file.

{ "features": { "graphqltransformer": { "addmissingownerfields": true, "validatetypenamereservedwords": true, "useexperimentalpipelinedtransformer": false } } }

^ that is originally how I found cli.json

I updated it like this to test { "features": { } }

I tried to delete the entire block (the object "graphqltransformer", see 2nd image attached ), and the CLI made some more progress in the build but then failed to say "No updates are to be performed.". (thats because i cleared the file and there was nothing there). So I think it had something to do with the way things are setup. Any help on how to resolve this issue would be fantastic!

Screen Shot 2020-12-07 at 5 08 28 PM Screen Shot 2020-12-07 at 5 12 15 PM

vikrantRajan avatar Dec 08 '20 01:12 vikrantRajan

@vikrantRajan do you have an Amplify CLI version pinned for your backend build CI/CD?

kaustavghosh06 avatar Dec 08 '20 01:12 kaustavghosh06

@iuyt9003 Can you install the latest version of the CLI > 4.37.0 and see if you're getting the same error? Saw a similar error out here - https://github.com/aws-amplify/amplify-adminui/issues/25 which got resolved by installing the latest version of the CLI locally.

kaustavghosh06 avatar Dec 08 '20 01:12 kaustavghosh06

Hey @kaustavghosh06 yes I will try! Thanks!

idobleicher avatar Dec 08 '20 11:12 idobleicher

@iuyt9003 the error you see is coming from the fact the CI/CD and the local CLI version is different and between the two versions we added a new feature flag that cannot be interpreted by the old CLI. Removing the feature flags can have unintended side effects and you can end up with different outputs in your local and CI/CD deployed environments. I would suggest to either stay on the latest or on the same version in all your CI/CD pipelines and developer machines. I'm closing the issue as the root cause has been identified if something new comes up feel free to re-open.

validateTypeNameReservedWords was added in 4.32.1 and you can always check feature flags in the docs.

attilah avatar Dec 08 '20 15:12 attilah