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?

gefragt vor einem Jahr81 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen