Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Migrating Next.js 13 Project from Vercel to AWS Amplify: "target" Property Error During Build #3777

Closed
5 tasks done
Phobarp opened this issue Oct 30, 2023 · 3 comments
Labels
archived This issue has been locked. pending-triage

Comments

@Phobarp
Copy link

Phobarp commented Oct 30, 2023

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

App Id

d3oljxqm6ok5q4

AWS Region

us-east-2

Amplify Hosting feature

Build settings

Frontend framework

Next.js

Next.js version

13

Next.js router

Pages Router

Describe the bug

I am currently migrating my Next.js project from Vercel to AWS Amplify and have run into an issue during the build process. The build fails with an error stating "The 'target' property is no longer supported in next.config.js."

Additional Details:
Node.js Version: v16.20.2

Expected behavior

The project should build and deploy without any errors related to the target property in next.config.js.

Reproduction steps

  1. Migrate Next.js 13 project from Vercel to AWS Amplify.
  2. Configure AWS Amplify build settings.
  3. Trigger a build.

Build Settings

version: 1
backend:
  phases:
    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - nvm install 16
        - nvm use 16
        - npm install
    build:
      commands:
        - npx next build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
      - $(npm root --global)/**/*

Log output

# Put your logs below this line


Additional information

I am specifically migrating from Vercel to AWS Amplify, and the project was working fine on Vercel. I have not been able to deploy the project successfully on AWS Amplify due to this issue.

Copy link

github-actions bot commented Nov 5, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@Phobarp
Copy link
Author

Phobarp commented Nov 5, 2023

Ended up fixing this by changing the platform from WEB_DYNAMIC to WEB_COMPUTE

Copy link

github-actions bot commented Nov 5, 2023

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Nov 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. pending-triage
Projects
None yet
Development

No branches or pull requests

1 participant