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?

preguntada hace un año81 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas