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?

질문됨 일 년 전81회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠