Search code examples
amazon-web-servicesaws-amplify

AWS: Member must satisfy enum value set: [WEB]


I am follow this guide https://docs.amplify.aws/guides/hosting/nextjs/q/platform/js#git-based-deployments to deploy my NextJS application to AWS amplify, but I am running into this error: error Where and how do I set up the WEB_DYNAMIC value to WEB?


Solution

  • I got the same issue today, Check your base directory in Build and test settings, mine was .next which was not correct So I changed the "scripts" value inside my package.json and then tried. After making changes my base directory was out and all worked fine.

    "scripts": {
      "dev": "next dev",
      "build": "next build && next export",
      "start": "next start"
    },
    

    See the "scripts" from here https://docs.amplify.aws/guides/hosting/nextjs/q/platform/js#cli-workflow