Describe the bug
I have the following amplify/.config/project-config.json
{
"projectName": "zzz",
"version": "2.0",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "frontend/src",
"DistributionDir": "frontend/build",
"BuildCommand": "npm run-script build",
"StartCommand": "npm run-script start"
}
},
"providers": [
"awscloudformation"
]
}
When I do amplify push on my machine it works fine, the aws-exports.js is created where SourceDir points to. When amplifyPush is executed during the build in the console it generates the file in ./src, ignoring SourceDir setting.
Amplify CLI Version
4.6.0
I am running into the same issue. I can confirm amplifyPush --simple places the file into ./src
Same here. Added this temporary fix in my amplify.yml file for now before my frontend build:
NOTE: I use
src/frontendbut yours may be simplysrc. The info is underamplify/.config/project-config.jsonunderSourceDirectorykey
- test -f src/aws-exports.js && cp src/aws-exports.js src/frontend/ # temporary fix: https://github.com/aws-amplify/amplify-console/issues/342
@asyschikov @BabyDino can you please try again and let us know if the issue persists?
Looks good! Thank you! :)
Just upgraded to 4.13.1, kicked a new build and it's now fixed.
Thank you @kahdojay and team