Next js error, when I try to build on AWS Amplify with environment variables

0

When I deploy to AWS Amplify my next js app using the standard Build settings- version: 1 frontend: phases: preBuild: commands: - npm install build: commands: - npm run build artifacts: baseDirectory: .next files: - '/*' cache: paths: - node_modules//* everything works, but my application uses environment variables, when I change build settings to the settings to those in the documentation - version: 1 frontend: phases: preBuild: commands: - npm ci build: commands: - env | grep -e NEXTAUTH_URL -e NEXTAUTH_SECRET -e MONGODB_URI >> .env.production - env | grep -e NEXT_PUBLIC_ >> .env.production - npm run build artifacts: baseDirectory: .next files: - '/*' cache: paths: - node_modules//* - .next/cache/**/* , I get errors. What do I need to do?

feita há um ano81 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas