There is this solution for solving the problem with aws-exports.js.
The first answer with "echo $export" solves it in sort of a workaround way, but I asking this question so that people can have access to the real solution and understand what is happing. I want to believe that AWS developers wouldn't allow such an important feature of amplify to require such action.
This is the root.amplify.yml
version: 1
backend:
phases:
build:
commands:
- amplifyPush --simple
- echo $PWD
- ls
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- echo $PWD
- ls
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
It runs the amplifyPush
command, but with ls we can see that it simply doesn't create aws-exports.js
. What is happening here? Why it doesn't create?