question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment fails on AWS Amplify

See original GitHub issue

I try to deploy on Vercel and Netlify no problem, when i try deploy on Amplify failed. Here’s the amplify.yml

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - yarn install
    build:
      commands:
        - yarn build
  artifacts:
    baseDirectory: out
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

and here’s the build logs

Build logs
2022-10-08T08:25:11.285Z [INFO]: # Cloning repository: git@github.com:DustinBrett/daedalOS.git
2022-10-08T08:25:42.052Z [INFO]: Cloning into 'daedalOS'...
                                 Updating files:  23% (448/1892)
Updating files:  24% (455/1892)
Updating files:  25% (473/1892)
Updating files:  26% (492/1892)
Updating files:  27% (511/1892)
Updating files:  27% (529/1892)
Updating files:  28% (530/1892)
Updating files:  29% (549/1892)
Updating files:  30% (568/1892)
Updating files:  31% (587/1892)
Updating files:  32% (606/1892)
Updating files:  33% (625/1892)
Updating files:  34% (644/1892)
Updating files:  35% (663/1892)
Updating files:  36% (682/1892)
Updating files:  37% (701/1892)
Updating files:  38% (719/1892)
Updating files:  39% (738/1892)
Updating files:  40% (757/1892)
Updating files:  41% (776/1892)
Updating files:  42% (795/1892)
Updating files:  43% (814/1892)
Updating files:  44% (833/1892)
Updating files:  45% (852/1892)
Updating files:  46% (871/1892)
Updating files:  47% (890/1892)
Updating files:  48% (909/1892)
Updating files:  49% (928/1892)
Updating files:  50% (946/1892)
Updating files:  51% (965/1892)
Updating files:  52% (984/1892)
Updating files:  53% (1003/1892)
Updating files:  54% (1022/1892)
Updating files:  55% (1041/1892)
Updating files:  56% (1060/1892)
Updating files:  57% (1079/1892)
Updating files:  58% (1098/1892)
Updating files:  59% (1117/1892)
Updating files:  60% (1136/1892)
Updating files:  61% (1155/1892)
Updating files:  62% (1174/1892)
Updating files:  63% (1192/1892)
Updating files:  64% (1211/1892)
Updating files:  65% (1230/1892)
Updating files:  66% (1249/1892)
Updating files:  67% (1268/1892)
Updating files:  68% (1287/1892)
Updating files:  69% (1306/1892)
Updating files:  70% (1325/1892)
Updating files:  71% (1344/1892)
Updating files:  72% (1363/1892)
Updating files:  73% (1382/1892)
Updating files:  74% (1401/1892)
Updating files:  75% (1419/1892)
Updating files:  76% (1438/1892)
Updating files:  77% (1457/1892)
Updating files:  78% (1476/1892)
Updating files:  79% (1495/1892)
Updating files:  80% (1514/1892)
Updating files:  81% (1533/1892)
Updating files:  82% (1552/1892)
Updating files:  83% (1571/1892)
Updating files:  84% (1590/1892)
Updating files:  85% (1609/1892)
Updating files:  86% (1628/1892)
Updating files:  87% (1647/1892)
Updating files:  88% (1665/1892)
Updating files:  89% (1684/1892)
Updating files:  89% (1693/1892)
Updating files:  90% (1703/1892)
Updating files:  91% (1722/1892)
Updating files:  92% (1741/1892)
Updating files:  93% (1760/1892)
Updating files:  94% (1779/1892)
Updating files:  95% (1798/1892)
Updating files:  96% (1817/1892)
Updating files:  97% (1836/1892)
Updating files:  98% (1855/1892)
Updating files:  99% (1874/1892)
Updating files: 100% (1892/1892)
Updating files: 100% (1892/1892), done.
2022-10-08T08:25:42.151Z [INFO]: # Switching to commit: 7c0af9c91ae65e103b5b0029f1a490dfb2edeeaf
2022-10-08T08:25:42.186Z [INFO]: Note: switching to '7c0af9c91ae65e103b5b0029f1a490dfb2edeeaf'.
                                 You are in 'detached HEAD' state. You can look around, make experimental
                                 changes and commit them, and you can discard any commits you make in this
                                 state without impacting any branches by switching back to a branch.
                                 If you want to create a new branch to retain commits you create, you may
                                 do so (now or later) by using -c with the switch command. Example:
                                 git switch -c <new-branch-name>
                                 Or undo this operation with:
                                 git switch -
                                 Turn off this advice by setting config variable advice.detachedHead to false
                                 HEAD is now at 7c0af9c only init session once
2022-10-08T08:25:42.222Z [INFO]: Successfully cleaned up Git credentials
2022-10-08T08:25:42.223Z [INFO]: # Checking for Git submodules at: /codebuild/output/src036869128/src/daedalOS/.gitmodules
2022-10-08T08:25:42.258Z [INFO]: # Retrieving environment cache...
2022-10-08T08:25:42.749Z [INFO]: # Retrieved environment cache
2022-10-08T08:25:42.750Z [INFO]: ---- Setting Up SSM Secrets ----
2022-10-08T08:25:42.750Z [INFO]: SSM params {"Path":"/amplify/d195a1uguzh0o0/main/","WithDecryption":true}
2022-10-08T08:25:52.300Z [INFO]: # Node version 16 is available for installation
2022-10-08T08:25:52.390Z [INFO]: # Installing Node version 16
2022-10-08T08:25:59.671Z [INFO]: # Now using Node version 16
2022-10-08T08:26:00.067Z [INFO]: # Retrieving cache...
2022-10-08T08:26:00.119Z [INFO]: # Extracting cache...
2022-10-08T08:26:00.131Z [INFO]: # Extraction completed
2022-10-08T08:26:39.987Z [INFO]: ## Starting Backend Build
                                 ## Checking for associated backend environment...
                                 ## No backend environment association found, continuing...
2022-10-08T08:26:39.989Z [INFO]: ## Completed Backend Build
2022-10-08T08:26:39.990Z [INFO]: ## Starting Frontend Build
2022-10-08T08:26:39.990Z [INFO]: # Starting phase: preBuild
                                 # Executing command: yarn install
2022-10-08T08:26:40.276Z [INFO]: yarn install v1.22.0
2022-10-08T08:26:40.345Z [INFO]: [1/4] Resolving packages...
2022-10-08T08:26:40.419Z [WARNING]: warning Resolution field "react-draggable@4.4.5" is incompatible with requested version "react-draggable@4.4.4"
2022-10-08T08:26:40.664Z [INFO]: [2/4] Fetching packages...
2022-10-08T08:26:54.716Z [INFO]: [1/5] Validating package.json...
2022-10-08T08:26:54.720Z [INFO]: [2/5] Resolving packages...
2022-10-08T08:26:54.919Z [INFO]: [3/5] Fetching packages...
2022-10-08T08:27:08.031Z [INFO]: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
2022-10-08T08:27:08.034Z [INFO]: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
2022-10-08T08:27:08.038Z [INFO]: [4/5] Linking dependencies...
2022-10-08T08:27:11.455Z [INFO]: [5/5] Building fresh packages...
2022-10-08T08:27:11.475Z [INFO]: $ npm run dist
2022-10-08T08:27:11.762Z [INFO]: > browserfs@2.0.0 dist
                                 > npm-run-all build lint script:make_dist dist:build:node
2022-10-08T08:27:12.160Z [INFO]: > browserfs@2.0.0 build
                                 > npm-run-all --parallel build:tsc build:scripts --sequential build:rollup --parallel build:webpack build:webpack-release
2022-10-08T08:27:12.622Z [INFO]: > browserfs@2.0.0 build:tsc
                                 > tsc -p src
2022-10-08T08:27:12.632Z [INFO]: > browserfs@2.0.0 build:scripts
                                 > tsc -p scripts
2022-10-08T08:27:18.427Z [INFO]: > browserfs@2.0.0 build:rollup
                                 > rollup -c src/rollup.config.js
2022-10-08T08:27:18.661Z [WARNING]: /usr/local/share/.cache/yarn/v6/.tmp/f7f9077a7e79efd82dab209cc317b089.a96aa2d417995dac7d376987839bc4e95e218e06.prepare/build/temp/library/ts/index.js → build/temp/library/rollup/browserfs.rollup.js...
2022-10-08T08:27:20.136Z [WARNING]: created build/temp/library/rollup/browserfs.rollup.js in 1.5s
2022-10-08T08:27:20.455Z [INFO]: > browserfs@2.0.0 build:webpack
                                 > webpack --config src/webpack.config.js
2022-10-08T08:27:20.457Z [INFO]: > browserfs@2.0.0 build:webpack-release
                                 > webpack -p --config src/webpack.config.js
2022-10-08T08:27:27.678Z [INFO]: Hash: 417a7d8b30e9affe60af
                                 Version: webpack 4.16.5
                                 Time: 6517ms
                                 Built at: 10/08/2022 8:27:27 AM
                                 Asset      Size  Chunks                    Chunk Names
                                 ../build/browserfs.js   245 KiB       0  [emitted]  [big]  main
                                 ../build/browserfs.js.map  1.09 MiB       0  [emitted]         main
                                 Entrypoint main [big] = ../build/browserfs.js ../build/browserfs.js.map
                                 [4] (webpack)/buildin/global.js 489 bytes {0} [built]
                                 [9] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
                                 [19] ./build/temp/library/rollup/browserfs.rollup.js 481 KiB {0} [built]
                                 [26] util (ignored) 15 bytes {0} [built]
                                 [28] util (ignored) 15 bytes {0} [built]
                                 [35] (webpack)/buildin/module.js 497 bytes {0} [built]
                                 + 41 hidden modules
                                 WARNING in configuration
                                 The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
                                 You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
                                 WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
                                 This can impact web performance.
                                 Assets:
                                 ../build/browserfs.js (245 KiB)
                                 WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
                                 Entrypoints:
                                 main (245 KiB)
                                 ../build/browserfs.js
                                 WARNING in webpack performance recommendations:
                                 You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
                                 For more info visit https://webpack.js.org/guides/code-splitting/
2022-10-08T08:27:27.688Z [INFO]: Hash: 02b2c2087ab58d2f8179
                                 Version: webpack 4.16.5
                                 Time: 6539ms
                                 Built at: 10/08/2022 8:27:27 AM
                                 Asset      Size  Chunks                    Chunk Names
                                 ../build/browserfs.min.js   245 KiB       0  [emitted]  [big]  main
                                 ../build/browserfs.min.js.map  1.09 MiB       0  [emitted]         main
                                 Entrypoint main [big] = ../build/browserfs.min.js ../build/browserfs.min.js.map
                                 [4] (webpack)/buildin/global.js 489 bytes {0} [built]
                                 [9] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
                                 [19] ./build/temp/library/rollup/browserfs.rollup.js 481 KiB {0} [built]
                                 [26] util (ignored) 15 bytes {0} [built]
                                 [28] util (ignored) 15 bytes {0} [built]
                                 [35] (webpack)/buildin/module.js 497 bytes {0} [built]
                                 + 41 hidden modules
                                 WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
                                 This can impact web performance.
                                 Assets:
                                 ../build/browserfs.min.js (245 KiB)
                                 WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
                                 Entrypoints:
                                 main (245 KiB)
                                 ../build/browserfs.min.js
                                 WARNING in webpack performance recommendations:
                                 You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
                                 For more info visit https://webpack.js.org/guides/code-splitting/
2022-10-08T08:27:28.008Z [INFO]: > browserfs@2.0.0 lint
                                 > tslint -c src/tslint.json --project src/tsconfig.json
2022-10-08T08:27:30.477Z [INFO]: > browserfs@2.0.0 script:make_dist
                                 > node build/scripts/make_dist.js
2022-10-08T08:27:30.804Z [INFO]: > browserfs@2.0.0 dist:build:node
                                 > tsc -p src/tsconfig.node.json
2022-10-08T08:27:36.408Z [INFO]: info @next/swc-android-arm-eabi@12.3.1: The platform "linux" is incompatible with this module.
2022-10-08T08:27:36.410Z [INFO]: info "@next/swc-android-arm-eabi@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-android-arm-eabi@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info @next/swc-android-arm64@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-android-arm64@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-android-arm64@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info @next/swc-darwin-arm64@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-darwin-arm64@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-darwin-arm64@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info @next/swc-darwin-x64@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-darwin-x64@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-freebsd-x64@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-freebsd-x64@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-linux-arm-gnueabihf@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info "@next/swc-linux-arm-gnueabihf@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-linux-arm64-gnu@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info "@next/swc-linux-arm64-gnu@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-linux-arm64-musl@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info "@next/swc-linux-arm64-musl@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-win32-arm64-msvc@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-win32-arm64-msvc@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-win32-arm64-msvc@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info @next/swc-win32-ia32-msvc@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-win32-ia32-msvc@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/swc-win32-ia32-msvc@12.3.1: The CPU architecture "x64" is incompatible with this module.
                                 info @next/swc-win32-x64-msvc@12.3.1: The platform "linux" is incompatible with this module.
                                 info "@next/swc-win32-x64-msvc@12.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
2022-10-08T08:27:36.417Z [INFO]: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
2022-10-08T08:27:36.417Z [INFO]: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
2022-10-08T08:27:36.424Z [INFO]: [3/4] Linking dependencies...
2022-10-08T08:27:36.425Z [WARNING]: warning " > styled-components@5.3.6" has unmet peer dependency "react-is@>= 16.8.0".
2022-10-08T08:27:36.426Z [WARNING]: warning " > @stylelint/postcss-css-in-js@0.38.0" has unmet peer dependency "postcss@>=7.0.0".
2022-10-08T08:27:36.427Z [WARNING]: warning " > eslint-config-airbnb@19.0.4" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.5.1".
2022-10-08T08:27:36.427Z [WARNING]: warning " > eslint-config-airbnb@19.0.4" has unmet peer dependency "eslint-plugin-react@^7.28.0".
2022-10-08T08:27:36.429Z [WARNING]: warning " > postcss-syntax@0.36.2" has unmet peer dependency "postcss@>=5.0.0".
2022-10-08T08:27:36.429Z [WARNING]: warning " > stylelint-config-sass-guidelines@9.0.1" has unmet peer dependency "postcss@^8.3.3".
2022-10-08T08:27:36.429Z [WARNING]: warning "stylelint-config-sass-guidelines > postcss-scss@4.0.5" has unmet peer dependency "postcss@^8.3.3".
2022-10-08T08:27:42.616Z [INFO]: [4/4] Building fresh packages...
2022-10-08T08:27:43.092Z [INFO]: $ husky install
2022-10-08T08:27:43.149Z [INFO]: husky - Git hooks installed
2022-10-08T08:27:43.152Z [INFO]: Done in 62.88s.
2022-10-08T08:27:43.180Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
2022-10-08T08:27:43.180Z [INFO]: # Executing command: yarn build
2022-10-08T08:27:43.312Z [INFO]: yarn run v1.22.0
2022-10-08T08:27:43.341Z [INFO]: $ yarn build:prebuild && next build
2022-10-08T08:27:43.515Z [INFO]: $ yarn build:fs && yarn build:search
2022-10-08T08:27:43.690Z [INFO]: $ node scripts/fs2json.js --exclude .index --out public/.index/fs.9p.json ./public && node scripts/preloadIcons.js
2022-10-08T08:27:43.736Z [INFO]: Creating file tree ...
2022-10-08T08:27:43.810Z [INFO]: Creating json ...
2022-10-08T08:27:44.024Z [INFO]: $ node scripts/searchIndex.js
2022-10-08T08:27:44.490Z [WARNING]: warn  - You have enabled experimental features (browsersListForSwc, legacyBrowsers) in next.config.js.
2022-10-08T08:27:44.491Z [WARNING]: warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
2022-10-08T08:27:44.492Z [INFO]: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2022-10-08T08:27:44.508Z [INFO]: Attention: Next.js now collects completely anonymous telemetry regarding usage.
2022-10-08T08:27:44.508Z [INFO]: This information is used to shape Next.js' roadmap and prioritize features.
                                 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
                                 https://nextjs.org/telemetry
2022-10-08T08:27:44.609Z [INFO]: info  - Linting and checking validity of types...
2022-10-08T08:28:27.394Z [INFO]: info  - Creating an optimized production build...
2022-10-08T08:29:03.637Z [INFO]: info  - Compiled successfully
2022-10-08T08:29:03.639Z [INFO]: info  - Collecting page data...
2022-10-08T08:29:06.904Z [INFO]: info  - Generating static pages (0/3)
2022-10-08T08:29:07.075Z [INFO]: info  - Generating static pages (3/3)
2022-10-08T08:29:07.085Z [INFO]: info  - Finalizing page optimization...
2022-10-08T08:29:07.087Z [INFO]: 
2022-10-08T08:29:07.105Z [INFO]: Route (pages)                              Size     First Load JS
                                 ┌ ○ /                                      21.9 kB         214 kB
                                 ├   /_app                                  0 B             192 kB
                                 └ ○ /404                                   294 B           192 kB
                                 + First Load JS shared by all              192 kB
                                 ├ chunks/framework-d51ece3d757c7ed2.js   45.2 kB
                                 ├ chunks/main-80cb2fec2514aa10.js        24.9 kB
                                 ├ chunks/pages/_app-5b14ca33392cb020.js  119 kB
                                 └ chunks/webpack-322aa2018bebb3e6.js     3.44 kB
2022-10-08T08:29:07.105Z [INFO]: ○  (Static)  automatically rendered as static HTML (uses no initial props)
2022-10-08T08:29:07.666Z [INFO]: Done in 84.36s.
2022-10-08T08:29:07.671Z [INFO]: Starting SSR Build...
2022-10-08T08:31:47.474Z [ERROR]: Error: Command failed with exit code 1: node_modules/.bin/next build
                                  warn  - Invalid next.config.js options detected:
                                  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
                                  See more info here: https://nextjs.org/docs/messages/invalid-next-config
                                  warn  - The `target` config is deprecated and will be removed in a future version.
                                  See more info here https://nextjs.org/docs/messages/deprecated-target-config
                                  warn  - You have enabled experimental features (browsersListForSwc, legacyBrowsers) in next.config.js.
                                  warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
                                  Failed to compile.
                                  ./node_modules/file-type/node_modules/strtok3/lib/FsPromise.js
                                  Module not found: Not found fs
                                  Import trace for requested module:
                                  ./node_modules/file-type/node_modules/strtok3/lib/FsPromise.js
                                  ./node_modules/file-type/node_modules/strtok3/lib/index.js
                                  ./node_modules/file-type/index.js
                                  ./utils/ipfs.ts
                                  ./utils/functions.ts
                                  ./hooks/useUrlLoader.ts
                                  ./pages/index.tsx
                                  > Build failed because of webpack errors
                                  info  - Linting and checking validity of types...
                                  info  - Creating an optimized production build...
                                  at makeError (/root/./-patch.2/node_modules/execa/lib/error.js:59:11)
                                  at handlePromise (/root/./-patch.2/node_modules/execa/index.js:114:26)
                                  at processTicksAndRejections (node:internal/process/task_queues:96:5) {
                                  shortMessage: 'Command failed with exit code 1: node_modules/.bin/next build',
                                  command: 'node_modules/.bin/next build',
                                  exitCode: 1,
                                  signal: undefined,
                                  signalDescription: undefined,
                                  stdout: 'info  - Linting and checking validity of types...\n' +
                                  'info  - Creating an optimized production build...',
                                  stderr: 'warn  - Invalid next.config.js options detected: \n' +
                                  '  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).\n' +
                                  '\n' +
                                  'See more info here: https://nextjs.org/docs/messages/invalid-next-config\n' +
                                  'warn  - The `target` config is deprecated and will be removed in a future version.\n' +
                                  'See more info here https://nextjs.org/docs/messages/deprecated-target-config\n' +
                                  'warn  - You have enabled experimental features (browsersListForSwc, legacyBrowsers) in next.config.js.\n' +
                                  'warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.\n' +
                                  '\n' +
                                  'Failed to compile.\n' +
                                  '\n' +
                                  './node_modules/file-type/node_modules/strtok3/lib/FsPromise.js\n' +
                                  'Module not found: Not found fs\n' +
                                  '\n' +
                                  'Import trace for requested module:\n' +
                                  './node_modules/file-type/node_modules/strtok3/lib/FsPromise.js\n' +
                                  './node_modules/file-type/node_modules/strtok3/lib/index.js\n' +
                                  './node_modules/file-type/index.js\n' +
                                  './utils/ipfs.ts\n' +
                                  './utils/functions.ts\n' +
                                  './hooks/useUrlLoader.ts\n' +
                                  './pages/index.tsx\n' +
                                  '\n' +
                                  '\n' +
                                  '> Build failed because of webpack errors',
                                  failed: true,
                                  timedOut: false,
                                  isCanceled: false,
                                  killed: false
                                  }
2022-10-08T08:31:47.475Z [ERROR]: [?25h
                                  99s › d195a1uguzh0o0 › Error: Command failed with exit code 1: node_modules/.bin/next build
                                  warn  - Invalid next.config.js options detected:
                                  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
                                  See more info here: https://nextjs.org/docs/messages/invalid-next-config
                                  warn  - The `target` config is deprecated and will be removed in a future version.
                                  See more info here https://nextjs.org/docs/messages/deprecated-target-config
                                  warn  - You have enabled experimental features (browsersListForSwc, legacyBrowsers) in next.config.js.
                                  warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
                                  Failed to compile.
                                  ./node_modules/file-type/node_modules/strtok3/lib/FsPromise.js
                                  Module not found: Not found fs
                                  Import trace for requested module:
                                  ./node_modules/file-type/node_modules/strtok3/lib/FsPromise.js
                                  ./node_modules/file-type/node_modules/strtok3/lib/index.js
                                  ./node_modules/file-type/index.js
                                  ./utils/ipfs.ts
                                  ./utils/functions.ts
                                  ./hooks/useUrlLoader.ts
                                  ./pages/index.tsx
                                  > Build failed because of webpack errors
                                  info  - Linting and checking validity of types...
                                  info  - Creating an optimized production build...
                                  [?25h
Terminating logging...

I don’t know why this happen. Maybe you can help me, thank you!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinBrettcommented, Oct 30, 2022

Thanks for testing it. I am still not sure why it thinks target is in the config. Perhaps it’s something AWS injects beforehand.

1reaction
coldrdycommented, Oct 30, 2022

Thank you for still following up this issue! I’ve try to redeploy with new commit but it fails. Here’s the logs

                                 ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: nvm install 16
2022-10-30T04:31:25.702Z [INFO]: Downloading and installing node v16.18.0...
2022-10-30T04:31:25.819Z [WARNING]: Downloading https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-x64.tar.gz...
2022-10-30T04:31:25.938Z [WARNING]: ##############################
2022-10-30T04:31:25.938Z [WARNING]: 42.4%
2022-10-30T04:31:26.038Z [WARNING]: ################################
2022-10-30T04:31:26.038Z [WARNING]: ################################          89.4%
2022-10-30T04:31:26.100Z [WARNING]: ###########################
2022-10-30T04:31:26.100Z [WARNING]: ############################################# 100.0%
2022-10-30T04:31:26.115Z [WARNING]: Computing checksum with sha256sum
2022-10-30T04:31:26.197Z [WARNING]: Checksums matched!
2022-10-30T04:31:27.667Z [INFO]: Now using node v16.18.0 (npm v8.19.2)
2022-10-30T04:31:27.696Z [INFO]: Installing default global packages from /root/.nvm/default-packages...
2022-10-30T04:31:27.696Z [INFO]: npm install -g --quiet yarn@1.22.0
2022-10-30T04:31:29.729Z [INFO]: added 1 package, and audited 2 packages in 2s
2022-10-30T04:31:29.732Z [INFO]: found 0 vulnerabilities
2022-10-30T04:31:29.737Z [INFO]: # Executing command: nvm use 16
2022-10-30T04:31:30.091Z [INFO]: Now using node v16.18.0 (npm v8.19.2)
2022-10-30T04:31:30.091Z [INFO]: # Executing command: yarn install --ignore-platform
2022-10-30T04:31:30.371Z [INFO]: yarn install v1.22.0
2022-10-30T04:31:30.439Z [INFO]: [1/4] Resolving packages...
2022-10-30T04:31:30.509Z [WARNING]: warning Resolution field "react-draggable@4.4.5" is incompatible with requested version "react-draggable@4.4.4"
2022-10-30T04:31:30.733Z [INFO]: [2/4] Fetching packages...
2022-10-30T04:31:52.506Z [INFO]: [1/5] Validating package.json...
2022-10-30T04:31:52.510Z [INFO]: [2/5] Resolving packages...
2022-10-30T04:31:52.688Z [INFO]: [3/5] Fetching packages...
2022-10-30T04:32:12.007Z [INFO]: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
2022-10-30T04:32:12.012Z [INFO]: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
2022-10-30T04:32:12.018Z [INFO]: [4/5] Linking dependencies...
2022-10-30T04:32:15.258Z [INFO]: [5/5] Building fresh packages...
2022-10-30T04:32:15.277Z [INFO]: $ npm run dist
2022-10-30T04:32:15.553Z [INFO]: > browserfs@2.0.0 dist
                                 > npm-run-all build lint script:make_dist dist:build:node
2022-10-30T04:32:15.932Z [INFO]: > browserfs@2.0.0 build
                                 > npm-run-all --parallel build:tsc build:scripts --sequential build:rollup --parallel build:webpack build:webpack-release
2022-10-30T04:32:16.326Z [INFO]: > browserfs@2.0.0 build:scripts
                                 > tsc -p scripts
2022-10-30T04:32:16.326Z [INFO]: > browserfs@2.0.0 build:tsc
                                 > tsc -p src
2022-10-30T04:32:21.719Z [INFO]: > browserfs@2.0.0 build:rollup
                                 > rollup -c src/rollup.config.js
2022-10-30T04:32:21.920Z [WARNING]: /usr/local/share/.cache/yarn/v6/.tmp/f7f9077a7e79efd82dab209cc317b089.a96aa2d417995dac7d376987839bc4e95e218e06.prepare/build/temp/library/ts/index.js → build/temp/library/rollup/browserfs.rollup.js...
2022-10-30T04:32:23.297Z [WARNING]: created build/temp/library/rollup/browserfs.rollup.js in 1.4s
2022-10-30T04:32:23.603Z [INFO]: > browserfs@2.0.0 build:webpack
                                 > webpack --config src/webpack.config.js
2022-10-30T04:32:23.604Z [INFO]: > browserfs@2.0.0 build:webpack-release
                                 > webpack -p --config src/webpack.config.js
2022-10-30T04:32:30.324Z [INFO]: Hash: 02b2c2087ab58d2f8179
                                 Version: webpack 4.16.5
                                 Time: 6067ms
                                 Built at: 10/30/2022 4:32:30 AM
                                 Asset      Size  Chunks                    Chunk Names
                                 ../build/browserfs.min.js   245 KiB       0  [emitted]  [big]  main
                                 ../build/browserfs.min.js.map  1.09 MiB       0  [emitted]         main
                                 Entrypoint main [big] = ../build/browserfs.min.js ../build/browserfs.min.js.map
                                 [4] (webpack)/buildin/global.js 489 bytes {0} [built]
                                 [9] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
                                 [19] ./build/temp/library/rollup/browserfs.rollup.js 481 KiB {0} [built]
                                 [26] util (ignored) 15 bytes {0} [built]
                                 [28] util (ignored) 15 bytes {0} [built]
                                 [35] (webpack)/buildin/module.js 497 bytes {0} [built]
                                 + 41 hidden modules
                                 WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
                                 This can impact web performance.
                                 Assets:
                                 ../build/browserfs.min.js (245 KiB)
                                 WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
                                 Entrypoints:
                                 main (245 KiB)
                                 ../build/browserfs.min.js
                                 WARNING in webpack performance recommendations:
                                 You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
                                 For more info visit https://webpack.js.org/guides/code-splitting/
2022-10-30T04:32:30.457Z [INFO]: Hash: 417a7d8b30e9affe60af
                                 Version: webpack 4.16.5
                                 Time: 6188ms
                                 Built at: 10/30/2022 4:32:30 AM
                                 Asset      Size  Chunks                    Chunk Names
                                 ../build/browserfs.js   245 KiB       0  [emitted]  [big]  main
                                 ../build/browserfs.js.map  1.09 MiB       0  [emitted]         main
                                 Entrypoint main [big] = ../build/browserfs.js ../build/browserfs.js.map
                                 [4] (webpack)/buildin/global.js 489 bytes {0} [built]
                                 [9] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
                                 [19] ./build/temp/library/rollup/browserfs.rollup.js 481 KiB {0} [built]
                                 [26] util (ignored) 15 bytes {0} [built]
                                 [28] util (ignored) 15 bytes {0} [built]
                                 [35] (webpack)/buildin/module.js 497 bytes {0} [built]
                                 + 41 hidden modules
                                 WARNING in configuration
                                 The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
                                 You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
                                 WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
                                 This can impact web performance.
                                 Assets:
                                 ../build/browserfs.js (245 KiB)
                                 WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
                                 Entrypoints:
                                 main (245 KiB)
                                 ../build/browserfs.js
                                 WARNING in webpack performance recommendations:
                                 You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
                                 For more info visit https://webpack.js.org/guides/code-splitting/
2022-10-30T04:32:30.747Z [INFO]: > browserfs@2.0.0 lint
                                 > tslint -c src/tslint.json --project src/tsconfig.json
2022-10-30T04:32:33.097Z [INFO]: > browserfs@2.0.0 script:make_dist
                                 > node build/scripts/make_dist.js
2022-10-30T04:32:33.410Z [INFO]: > browserfs@2.0.0 dist:build:node
                                 > tsc -p src/tsconfig.node.json
2022-10-30T04:32:38.828Z [INFO]: [3/4] Linking dependencies...
2022-10-30T04:32:38.830Z [WARNING]: warning " > styled-components@5.3.6" has unmet peer dependency "react-is@>= 16.8.0".
2022-10-30T04:32:38.830Z [WARNING]: warning " > @stylelint/postcss-css-in-js@0.38.0" has unmet peer dependency "postcss@>=7.0.0".
2022-10-30T04:32:38.831Z [WARNING]: warning " > eslint-config-airbnb@19.0.4" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.5.1".
2022-10-30T04:32:38.831Z [WARNING]: warning " > eslint-config-airbnb@19.0.4" has unmet peer dependency "eslint-plugin-react@^7.28.0".
2022-10-30T04:32:38.833Z [WARNING]: warning " > postcss-syntax@0.36.2" has unmet peer dependency "postcss@>=5.0.0".
2022-10-30T04:32:38.833Z [WARNING]: warning " > stylelint-config-sass-guidelines@9.0.1" has unmet peer dependency "postcss@^8.3.3".
2022-10-30T04:32:38.834Z [WARNING]: warning "stylelint-config-sass-guidelines > postcss-scss@4.0.5" has unmet peer dependency "postcss@^8.3.3".
2022-10-30T04:32:46.339Z [INFO]: [4/4] Building fresh packages...
2022-10-30T04:32:46.784Z [INFO]: $ husky install
2022-10-30T04:32:46.839Z [INFO]: husky - Git hooks installed
2022-10-30T04:32:46.842Z [INFO]: Done in 76.48s.
2022-10-30T04:32:46.866Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
2022-10-30T04:32:46.867Z [INFO]: # Executing command: nvm use 16
2022-10-30T04:32:47.224Z [INFO]: Now using node v16.18.0 (npm v8.19.2)
2022-10-30T04:32:47.224Z [INFO]: # Executing command: node -v
2022-10-30T04:32:47.227Z [INFO]: v16.18.0
2022-10-30T04:32:47.227Z [INFO]: # Executing command: yarn run build
2022-10-30T04:32:47.350Z [INFO]: yarn run v1.22.0
2022-10-30T04:32:47.376Z [INFO]: $ yarn build:prebuild && next build
2022-10-30T04:32:47.538Z [INFO]: $ yarn build:fs && yarn build:search
2022-10-30T04:32:47.699Z [INFO]: $ node scripts/fs2json.js --exclude .index --out public/.index/fs.9p.json ./public && node scripts/preloadIcons.js
2022-10-30T04:32:47.743Z [INFO]: Creating file tree ...
2022-10-30T04:32:47.820Z [INFO]: Creating json ...
2022-10-30T04:32:48.012Z [INFO]: $ node scripts/searchIndex.js
2022-10-30T04:32:48.482Z [INFO]: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2022-10-30T04:32:48.494Z [INFO]: Attention: Next.js now collects completely anonymous telemetry regarding usage.
2022-10-30T04:32:48.495Z [INFO]: This information is used to shape Next.js' roadmap and prioritize features.
                                 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
                                 https://nextjs.org/telemetry
2022-10-30T04:32:48.593Z [INFO]: info  - Linting and checking validity of types...
2022-10-30T04:33:29.498Z [INFO]: info  - Creating an optimized production build...
2022-10-30T04:34:03.772Z [INFO]: info  - Compiled successfully
2022-10-30T04:34:03.774Z [INFO]: info  - Collecting page data...
2022-10-30T04:34:08.703Z [INFO]: info  - Generating static pages (0/3)
2022-10-30T04:34:08.867Z [INFO]: info  - Generating static pages (3/3)
2022-10-30T04:34:08.875Z [INFO]: info  - Finalizing page optimization...
2022-10-30T04:34:08.878Z [INFO]: 
2022-10-30T04:34:08.893Z [INFO]: Route (pages)                              Size     First Load JS
                                 ┌ ○ /                                      25.5 kB         221 kB
                                 ├   /_app                                  0 B             195 kB
                                 └ ○ /404                                   294 B           196 kB
                                 + First Load JS shared by all              195 kB
                                 ├ chunks/framework-d51ece3d757c7ed2.js   45.2 kB
                                 ├ chunks/main-4bb1e39ff6df9d80.js        25.3 kB
                                 ├ chunks/pages/_app-a4b089954297ab61.js  121 kB
                                 └ chunks/webpack-6768f4810e7f07bc.js     3.41 kB
2022-10-30T04:34:08.894Z [INFO]: ○  (Static)  automatically rendered as static HTML (uses no initial props)
2022-10-30T04:34:09.209Z [INFO]: Done in 81.86s.
2022-10-30T04:34:09.213Z [INFO]: Starting SSR Build...
2022-10-30T04:39:09.175Z [ERROR]: Error: Command failed with exit code 1: node_modules/.bin/next build
                                  warn  - Invalid next.config.js options detected:
                                  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
                                  See more info here: https://nextjs.org/docs/messages/invalid-next-config
                                  > Build error occurred
                                  Error: The "target" property is no longer supported in next.config.js.
                                  See more info here https://nextjs.org/docs/messages/deprecated-target-config
                                  at Object.loadConfig [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/server/config.js:97:19)
                                  at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)
                                  at async /codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:68:28
                                  at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)
                                  at async Object.build [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:64:29)
                                  at makeError (/root/./-patch.2/node_modules/execa/lib/error.js:59:11)
                                  at handlePromise (/root/./-patch.2/node_modules/execa/index.js:114:26)
                                  at runMicrotasks (<anonymous>)
                                  at processTicksAndRejections (node:internal/process/task_queues:96:5) {
                                  shortMessage: 'Command failed with exit code 1: node_modules/.bin/next build',
                                  command: 'node_modules/.bin/next build',
                                  exitCode: 1,
                                  signal: undefined,
                                  signalDescription: undefined,
                                  stdout: '',
                                  stderr: 'warn  - Invalid next.config.js options detected: \n' +
                                  '  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).\n' +
                                  '\n' +
                                  'See more info here: https://nextjs.org/docs/messages/invalid-next-config\n' +
                                  '\n' +
                                  '> Build error occurred\n' +
                                  'Error: The "target" property is no longer supported in next.config.js.\n' +
                                  'See more info here https://nextjs.org/docs/messages/deprecated-target-config\n' +
                                  '    at Object.loadConfig [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/server/config.js:97:19)\n' +
                                  '    at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)\n' +
                                  '    at async /codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:68:28\n' +
                                  '    at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)\n' +
                                  '    at async Object.build [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:64:29)',
                                  failed: true,
                                  timedOut: false,
                                  isCanceled: false,
                                  killed: false
                                  }
2022-10-30T04:39:09.178Z [ERROR]: [?25h
                                  147s › d195a1uguzh0o0 › Error: Command failed with exit code 1: node_modules/.bin/next build
                                  warn  - Invalid next.config.js options detected:
                                  - The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
                                  See more info here: https://nextjs.org/docs/messages/invalid-next-config
                                  > Build error occurred
                                  Error: The "target" property is no longer supported in next.config.js.
                                  See more info here https://nextjs.org/docs/messages/deprecated-target-config
                                  at Object.loadConfig [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/server/config.js:97:19)
                                  at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)
                                  at async /codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:68:28
                                  at async Span.traceAsyncFn (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/trace/trace.js:79:20)
                                  at async Object.build [as default] (/codebuild/output/src370004122/src/daedalOS/node_modules/next/dist/build/index.js:64:29)
                                  [?25h
Terminating logging...

next.config.js

// @ts-check

const isProduction = process.env.NODE_ENV === "production";

const bundleAnalyzer = process.env.npm_config_argv?.includes(
  "build:bundle-analyzer"
);

const webpack = require("webpack");

/**
 * @type {import("next").NextConfig}
 * */
const nextConfig = {
  compiler: {
    reactRemoveProperties: isProduction,
    removeConsole: isProduction,
    styledComponents: {
      displayName: !isProduction,
      minify: isProduction,
      pure: true,
    },
  },
  devIndicators: {
    buildActivityPosition: "top-right",
  },
  experimental: {
    legacyBrowsers: false,
    swcFileReading: true,
  },
  optimizeFonts: false,
  productionBrowserSourceMaps: false,
  reactStrictMode: true,
  swcMinify: !isProduction,
  webpack: (config) => {
    config.externals.push("wasmer_wasi_js_bg.wasm");
    config.plugins.push(
      new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {
        const mod = resource.request.replace(/^node:/, "");

        switch (mod) {
          case "buffer":
            resource.request = "buffer";
            break;
          case "stream":
            resource.request = "readable-stream";
            break;
          default:
            throw new Error(`Not found ${mod}`);
        }
      })
    );

    return config;
  },
};

module.exports = bundleAnalyzer
  ? require("@next/bundle-analyzer")({
      enabled: isProduction,
    })(nextConfig)
  : nextConfig;

amplify.yml

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - nvm install 16
        - nvm use 16
        - yarn install --ignore-platform
    build:
      commands:
        - nvm use 16
        - node -v
        - yarn run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
Read more comments on GitHub >

github_iconTop Results From Across the Web

"amplify publish" fails to deploy without any detailed error ...
js application for the first time and trying manual deployment process. We are getting following error when we try to run "amplify publish"....
Read more >
Deploy stage fails with "[ERROR]: Failed to deploy" #2805
The issue is, when the Deploy stage starts, it immediately fails and ... a resolution to their AWS amplify / Playwright integration issue....
Read more >
Amplify can't deploy, stuck while deploying | AWS re:Post
I have a static site hosted on amplify and a github repository linked with the amplify app. Everything worked fine until yesterday.
Read more >
Troubleshoot CloudFormation stack issues in AWS Amplify
1. Open the Amplify console. 2. Choose the Backend environments tab. Then choose your application's backend environment. 3. Choose the Overview ...
Read more >
Manual deploys - AWS Amplify Hosting
This blog post describes the process for setting up a Lambda trigger to automatically deploy changes to Amplify Hosting when updates are made...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found