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

sudden build error: !!! CustomerError: Can't find required-server-files.json in build output directory #3920

Open
3 tasks done
adcanis opened this issue Apr 8, 2024 · 0 comments

Comments

@adcanis
Copy link

adcanis commented Apr 8, 2024

Before opening, please confirm:

JavaScript Framework

Next.js

Amplify APIs

REST API, GraphQL API

Amplify Version

v5

Amplify Categories

function, api

Backend

Amplify CLI

Environment information

  System:
    OS: macOS 14.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 461.95 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.2.0 - ~/.nvm/versions/node/v21.2.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v21.2.0/bin/npm
  Browsers:
    Chrome: 123.0.6312.107
    Safari: 17.1
    Safari Technology Preview: 17.4
  npmPackages:
    @ampproject/toolbox-optimizer:  undefined ()
    @apollo/client: ^3.8.9 => 3.8.9 
    @apollo/client/cache:  undefined ()
    @apollo/client/core:  undefined ()
    @apollo/client/dev:  undefined ()
    @apollo/client/errors:  undefined ()
    @apollo/client/link/batch:  undefined ()
    @apollo/client/link/batch-http:  undefined ()
    @apollo/client/link/context:  undefined ()
    @apollo/client/link/core:  undefined ()
    @apollo/client/link/error:  undefined ()
    @apollo/client/link/http:  undefined ()
    @apollo/client/link/persisted-queries:  undefined ()
    @apollo/client/link/remove-typename:  undefined ()
    @apollo/client/link/retry:  undefined ()
    @apollo/client/link/schema:  undefined ()
    @apollo/client/link/subscriptions:  undefined ()
    @apollo/client/link/utils:  undefined ()
    @apollo/client/link/ws:  undefined ()
    @apollo/client/react:  undefined ()
    @apollo/client/react/components:  undefined ()
    @apollo/client/react/context:  undefined ()
    @apollo/client/react/hoc:  undefined ()
    @apollo/client/react/hooks:  undefined ()
    @apollo/client/react/parser:  undefined ()
    @apollo/client/react/ssr:  undefined ()
    @apollo/client/testing:  undefined ()
    @apollo/client/testing/core:  undefined ()
    @apollo/client/utilities:  undefined ()
    @apollo/client/utilities/globals:  undefined ()
    @arcgis/core: ^4.28.10 => 4.28.10 
    @babel/core:  undefined ()
    @babel/runtime:  7.22.5 
    @dnd-kit/sortable: ^8.0.0 => 8.0.0 
    @edge-runtime/cookies:  4.0.2 
    @edge-runtime/ponyfill:  2.4.1 
    @edge-runtime/primitives:  4.0.2 
    @hapi/accept:  undefined ()
    @mswjs/interceptors:  undefined ()
    @napi-rs/triples:  undefined ()
    @next/font:  undefined ()
    @next/react-dev-overlay:  undefined ()
    @opentelemetry/api:  undefined ()
    @perennia/utilities-and-defaults: ^1.0.20 => 1.0.20 
    @react-three/drei: ^9.93.0 => 9.93.0 
    @react-three/fiber: ^8.15.13 => 8.15.13 
    @react-three/postprocessing: ^2.15.11 => 2.15.11 
    @segment/ajv-human-errors:  undefined ()
    @tanstack/react-table: ^8.11.7 => 8.11.7 
    @types/aws-sdk: ^2.7.0 => 2.7.0 
    @types/chart.js: ^2.9.41 => 2.9.41 
    @types/chartjs-plugin-annotation: ^0.5.5 => 0.5.5 
    @types/leaflet: ^1.9.8 => 1.9.8 
    @types/luxon: ^3.4.0 => 3.4.0 
    @types/node: ^20 => 20.10.8 
    @types/react: ^18 => 18.2.47 
    @types/react-dom: ^18 => 18.2.18 
    @types/react-gauge-chart: ^0.4.3 => 0.4.3 
    @types/three: ^0.160.0 => 0.160.0 
    @types/uuid: ^9.0.7 => 9.0.7 
    @vercel/nft:  undefined ()
    @vercel/og:  0.5.15 
    acorn:  undefined ()
    amphtml-validator:  undefined ()
    anser:  undefined ()
    arg:  undefined ()
    assert:  undefined ()
    async-retry:  undefined ()
    async-sema:  undefined ()
    aws-amplify: ^5.0.22 => 5.0.22 
    aws-appsync-auth-link: ^3.0.7 => 3.0.7 
    aws-appsync-subscription-link: ^3.1.2 => 3.1.2 
    aws-sdk: ^2.1532.0 => 2.1532.0 
    axios: ^1.6.7 => 1.6.7 (0.26.0)
    babel-packages:  undefined ()
    browserify-zlib:  undefined ()
    browserslist:  undefined ()
    buffer:  undefined ()
    bytes:  undefined ()
    chart.js: ^4.4.1 => 4.4.1 
    chart.js-auto:  undefined ()
    chart.js-helpers:  undefined ()
    chartjs-plugin-annotation: ^3.0.1 => 3.0.1 
    chartjs-plugin-zoom: ^2.0.1 => 2.0.1 
    ci-info:  undefined ()
    cli-select:  undefined ()
    client-only:  0.0.1 
    comment-json:  undefined ()
    compression:  undefined ()
    conf:  undefined ()
    constants-browserify:  undefined ()
    content-disposition:  undefined ()
    content-type:  undefined ()
    cookie:  undefined ()
    cross-spawn:  undefined ()
    crypto-browserify:  undefined ()
    css.escape:  undefined ()
    data-uri-to-buffer:  undefined ()
    debug:  undefined ()
    devalue:  undefined ()
    domain-browser:  undefined ()
    edge-runtime:  undefined ()
    env-cmd: ^10.1.0 => 10.1.0 
    eslint: ^8 => 8.56.0 
    eslint-config-next: 14.0.4 => 14.0.4 
    events:  undefined ()
    faker: ^6.6.6 => 6.6.6 
    find-cache-dir:  undefined ()
    find-up:  undefined ()
    framer-motion: ^10.18.0 => 10.18.0 
    fresh:  undefined ()
    get-orientation:  undefined ()
    glob:  undefined ()
    graphql: ^16.8.1 => 16.8.1 (15.8.0)
    gzip-size:  undefined ()
    http-proxy:  undefined ()
    http-proxy-agent:  undefined ()
    https-browserify:  undefined ()
    https-proxy-agent:  undefined ()
    icss-utils:  undefined ()
    ignore-loader:  undefined ()
    image-size:  undefined ()
    is-animated:  undefined ()
    is-docker:  undefined ()
    is-wsl:  undefined ()
    jest-worker:  undefined ()
    json5:  undefined ()
    jsonwebtoken:  undefined ()
    jspdf: ^2.5.1 => 2.5.1 
    leaflet: ^1.9.4 => 1.9.4 
    loader-runner:  undefined ()
    loader-utils:  undefined ()
    lodash: ^4.17.21 => 4.17.21 
    lodash.curry:  undefined ()
    lru-cache:  undefined ()
    luxon: ^3.4.4 => 3.4.4 
    micromatch:  undefined ()
    mini-css-extract-plugin:  undefined ()
    moment-timezone: ^0.5.44 => 0.5.44 
    nanoid:  undefined ()
    native-url:  undefined ()
    neo-async:  undefined ()
    next: 14.0.4 => 14.0.4 
    node-fetch:  undefined ()
    node-html-parser:  undefined ()
    ora:  undefined ()
    os-browserify:  undefined ()
    p-limit:  undefined ()
    path-browserify:  undefined ()
    platform:  undefined ()
    postcss-flexbugs-fixes:  undefined ()
    postcss-modules-extract-imports:  undefined ()
    postcss-modules-local-by-default:  undefined ()
    postcss-modules-scope:  undefined ()
    postcss-modules-values:  undefined ()
    postcss-preset-env:  undefined ()
    postcss-safe-parser:  undefined ()
    postcss-scss:  undefined ()
    postcss-value-parser:  undefined ()
    postprocessing: ^6.34.1 => 6.34.1 
    process:  undefined ()
    punycode:  undefined ()
    querystring-es3:  undefined ()
    raw-body:  undefined ()
    react: ^18 => 18.2.0 
    react-builtin:  undefined ()
    react-chartjs-2: ^5.2.0 => 5.2.0 
    react-dom: ^18 => 18.2.0 
    react-dom-builtin:  undefined ()
    react-dom-experimental-builtin:  undefined ()
    react-experimental-builtin:  undefined ()
    react-ga: ^3.3.1 => 3.3.1 
    react-gauge-component: ^1.2.0 => 1.2.0 
    react-icons: ^5.0.0 => 5.0.0 
    react-is:  18.2.0 
    react-leaflet: ^4.2.1 => 4.2.1 
    react-refresh:  0.12.0 
    react-select: ^5.8.0 => 5.8.0 
    react-server-dom-turbopack-builtin:  undefined ()
    react-server-dom-turbopack-experimental-builtin:  undefined ()
    react-server-dom-webpack-builtin:  undefined ()
    react-server-dom-webpack-experimental-builtin:  undefined ()
    react-toastify: ^9.1.3 => 9.1.3 
    regenerator-runtime:  0.13.4 
    sass: ^1.69.7 => 1.69.7 
    sass-loader:  undefined ()
    scheduler-builtin:  undefined ()
    scheduler-experimental-builtin:  undefined ()
    schema-utils:  undefined ()
    scroller-motion: ^1.2.3 => 1.2.3 
    semver:  undefined ()
    send:  undefined ()
    server-only:  0.0.1 
    setimmediate:  undefined ()
    sharp: ^0.33.1 => 0.33.1 
    shell-quote:  undefined ()
    source-map:  undefined ()
    stacktrace-parser:  undefined ()
    stream-browserify:  undefined ()
    stream-http:  undefined ()
    string-hash:  undefined ()
    string_decoder:  undefined ()
    strip-ansi:  undefined ()
    superstruct:  undefined ()
    tar:  undefined ()
    terser:  undefined ()
    text-table:  undefined ()
    three: ^0.160.0 => 0.160.0 
    timers-browserify:  undefined ()
    tty-browserify:  undefined ()
    typescript: ^5.0.2 => 5.0.2 
    ua-parser-js:  undefined ()
    unistore:  undefined ()
    util:  undefined ()
    uuid: ^9.0.1 => 9.0.1 (3.4.0, 8.3.2, 8.0.0)
    vm-browserify:  undefined ()
    watchpack:  undefined ()
    web-vitals:  undefined ()
    webpack:  undefined ()
    webpack-sources:  undefined ()
    ws:  undefined ()
    xlsx: ^0.18.5 => 0.18.5 
    yup: ^1.3.3 => 1.3.3 
    zod:  undefined ()
  npmGlobalPackages:
    @microsoft/rush: 5.112.2
    corepack: 0.23.0
    npm: 10.2.3


Describe the bug

All of a sudden i am getting a failed build on the frontend with the error

!!! CustomerError: Can't find required-server-files.json in build output directory

Expected behavior

build and deploy

Reproduction steps

  1. deploy

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

build script:

version: 1
applications:

  • frontend:
    phases:
    preBuild:
    commands:
    - export NODE_OPTIONS=--max_old_space_size=4096
    - npm ci
    build:
    commands:
    - npm run build
    artifacts:
    baseDirectory: .next
    files:
    - '**/*'

      This is the same build script used in ~20 different apps without issue. 
    
@jimblanc jimblanc transferred this issue from aws-amplify/amplify-js Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant