Next deployed to AWS Amplify does not work.
Unanswered
Yellowfin tuna posted this in #help-forum
Yellowfin tunaOP
I created a basic NextJs app and deployed it to aws amplify from both dev and release branches.
Both the links do not work.
The only page I created does not use SSR and hence the build is static.
I am unable to identify the issue as I am new to using next
here is my next config - as an attempt to create an out folder since my build is static.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here /
output: 'export',
images: {
unoptimized: true, // disables the optimization API
},
};
export default nextConfig;
and my amplify.yml
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
- npx next export
artifacts:
baseDirectory: out
files:
- '**/'
cache:
paths:
- node_modules/*/
Both the links do not work.
The only page I created does not use SSR and hence the build is static.
I am unable to identify the issue as I am new to using next
here is my next config - as an attempt to create an out folder since my build is static.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here /
output: 'export',
images: {
unoptimized: true, // disables the optimization API
},
};
export default nextConfig;
and my amplify.yml
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
- npx next export
artifacts:
baseDirectory: out
files:
- '**/'
cache:
paths:
- node_modules/*/