Closed chrodin closed 2 years ago
Hey @chrodin :wave: thanks for raising this, and thank you for including those details! Are you able to use amplify mock
with the faux API key? The aws-exports.js skeleton you posted looks correct, therefore this appears it may be an issue with the aws-amplify
library. Can you post the list of dependencies you're using? I'm curious if there are any scoped (e.g. @aws-amplify/auth
) installed alongside aws-amplify
Closing due to inactivity.
Just closing comment to this.
I was not able to get it running, so in desperation I finally I pulled the project into a new folder and everything worked fine. Still no idea what was wrong, but that solved it for me.
There were no visible changes but I guess something must have been messed up in some settings somewhere.
Anyway, thanks @josefaidt for the reply, sorry I missed it :)
Thanks for the follow up @chrodin!
simple solution solve this is 1) remove node_modules - folder 2) remove package-lock.json file - if using npm 3) install fresh npm modules - npm i
this solve problem with no api-key configured or no credentials after update aws-amplify
Which Category is your question related to? API and/or Auth
Amplify CLI Version 10.3.2
Node Version 14.16.0
What AWS Services are you utilizing? Amplify, AppSync, Cognito, DynamoDB, API Gateway, ...
Provide additional details e.g. code snippets I've changed Node version to match min criteria for a library we're using, and at the same time I upgraded Amplify. After that I had a bunch of problems to get the project running.
I then removed
node_modules
and rannpm i
. Still couldn't run the project.Next step was to remove
node_modules
and thepackage-lock.json
(andnpm i
) which made it possible to build and run the project. However, I cannot fetch any data and in the console I see this error:There is a valid api-key in the project and (also cognito user pools) which is proven by the fact that the production env is still running properly, and also an instance of localhost that has not been refreshed since upgrades is also still running fine.
The problem The problem itself is obvious: I can't make any successful requests. The reason behind it might be supersimple but I can't figure it out. It sort of feels like the project somehow doesn't care about the
aws-exports.js
-file, or some configuration is messed up or something? I have runamplify pull
, but has not helped.How can I again get the project to use the credentials that obviously exists? :)
Here's our
aws-exports.js
: