-
Notifications
You must be signed in to change notification settings - Fork 87
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
Error: No static assets found in .next dist (aka no /.next/static). Please check your project configuration. Your next.config.js must be one of serverless
or experimental-serverless-trace
. Your build command should include next build
.
#390
Comments
@davidli108 Trigger a build again. I was having this issue and when I simply redeploy from Netlify Dashboard then it works fine for me. Give it aa try, it might help you as well. |
@samiahmedsiddiqui Thanks for your comment. |
@samiahmedsiddiqui Thank you. |
@davidli108 hey david! thanks for opening this issue! do you have your |
@lindsaylevine Thanks for your comment. My issue is happening in this line Here,
And then, So I thought I look forward to hearing from you. |
@davidli108 Please add |
@davidli108 my suggestions right now:
|
I am getting the same error for my monorepo.... When looking into the See netlify build log1:23:46 AM: Parsing package.json dependencies
1:23:46 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'web/.next' versus '' in the Netlify UI
1:23:46 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn build-web; ls -alh web/.next/; ls -alh web/.next/static' versus '' in the Netlify UI
1:23:46 AM: Starting build script
1:23:46 AM: Installing dependencies
1:23:46 AM: Python version set to 2.7
1:23:47 AM: Started restoring cached node version
1:23:49 AM: Finished restoring cached node version
1:23:49 AM: Attempting node version 'v14.17.1' from .node-version
1:23:50 AM: Downloading and installing node v14.17.1...
1:23:50 AM: Downloading https://nodejs.org/dist/v14.17.1/node-v14.17.1-linux-x64.tar.xz...
1:23:50 AM: Computing checksum with sha256sum
1:23:50 AM: Checksums matched!
1:23:53 AM: Now using node v14.17.1 (npm v6.14.13)
1:23:53 AM: Started restoring cached build plugins
1:23:53 AM: Finished restoring cached build plugins
1:23:53 AM: Attempting ruby version 2.7.2, read from environment
1:23:55 AM: Using ruby version 2.7.2
1:23:55 AM: Using PHP version 5.6
1:23:55 AM: Started restoring cached yarn cache
1:23:55 AM: Finished restoring cached yarn cache
1:23:56 AM: No yarn workspaces detected
1:23:56 AM: Started restoring cached node modules
1:23:56 AM: Finished restoring cached node modules
1:23:56 AM: Installing NPM modules using Yarn version 1.22.10
1:23:56 AM: yarn install v1.22.10
1:23:56 AM: [1/4] Resolving packages...
1:23:57 AM: warning wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @vercel/nft > [email protected]: acorn>=7.2 supports import-meta
1:23:57 AM: warning wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @vercel/nft > [email protected]: acorn>=7.2 supports export-ns-from
1:23:57 AM: warning wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @vercel/nft > [email protected]: acorn>=7.4 supports numeric separators
1:23:57 AM: warning wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @vercel/nft > [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
1:23:58 AM: warning wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @aws-sdk/client-s3 > @aws-sdk/middleware-retry > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
1:23:59 AM: [2/4] Fetching packages...
1:24:49 AM: info [email protected]: The platform "linux" is incompatible with this module.
1:24:49 AM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
1:24:49 AM: info [email protected]: The platform "linux" is incompatible with this module.
1:24:49 AM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
1:24:49 AM: info @netlify/[email protected]: The platform "linux" is incompatible with this module.
1:24:49 AM: info "@netlify/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
1:24:49 AM: info @netlify/[email protected]: The CPU architecture "x64" is incompatible with this module.
1:24:49 AM: info @netlify/[email protected]: The platform "linux" is incompatible with this module.
1:24:49 AM: info "@netlify/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
1:24:49 AM: info @netlify/[email protected]: The platform "linux" is incompatible with this module.
1:24:49 AM: info "@netlify/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
1:24:49 AM: [3/4] Linking dependencies...
1:24:49 AM: warning "wabainc-studio > @sanity/base > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/base > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/base > [email protected]" has incorrect peer dependency "react@^16.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/base > [email protected]" has incorrect peer dependency "react-dom@^16.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/base > [email protected]" has unmet peer dependency "react-is@>= 16.8.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @sanity/[email protected]" has unmet peer dependency "webpack@>= 1.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/desk-tool > [email protected]" has incorrect peer dependency "react@^15.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/desk-tool > [email protected]" has incorrect peer dependency "[email protected] || 16.x".
1:24:49 AM: warning "wabainc-studio > @sanity/vision > [email protected]" has incorrect peer dependency "react@>=15.5 <=16.x".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/plugin-proposal-class-properties > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.13.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.12.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-typescript > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @sanity/server > @hot-loader/[email protected]" has incorrect peer dependency "react@^16.14.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @sanity/webpack-integration > [email protected]" has unmet peer dependency "caniuse-lite@^1.0.30000697".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > @babel/plugin-proposal-unicode-property-regex > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-env > babel-plugin-polyfill-corejs2 > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.4.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-react > @babel/plugin-transform-react-jsx > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-studio > @sanity/core > @babel/preset-typescript > @babel/plugin-transform-typescript > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
1:24:49 AM: warning "wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @vercel/nft > [email protected]" has incorrect peer dependency "acorn@^6.0.1".
1:24:49 AM: warning "wabainc-web > @netlify/plugin-nextjs > @sls-next/lambda-at-edge > @aws-sdk/client-s3 > @aws-sdk/middleware-retry > [email protected]" has unmet peer dependency "react-native@>=0.56".
1:24:49 AM: warning " > [email protected]" has unmet peer dependency "next@>=10.2.0".
1:24:49 AM: warning Workspaces can only be enabled in private projects.
1:24:49 AM: warning Workspaces can only be enabled in private projects.
1:24:49 AM: warning Workspaces can only be enabled in private projects.
1:24:49 AM: warning Workspaces can only be enabled in private projects.
1:25:17 AM: [4/4] Building fresh packages...
1:25:23 AM: success Saved lockfile.
1:25:23 AM: $ lerna bootstrap
1:25:24 AM: lerna notice cli v4.0.0
1:25:24 AM: lerna info ci enabled
1:25:24 AM: lerna info bootstrap root only
1:25:24 AM: yarn install v1.22.10
1:25:24 AM: [1/4] Resolving packages...
1:25:25 AM: success Already up-to-date.
1:25:25 AM: $ lerna bootstrap
1:25:25 AM: lerna notice cli v4.0.0
1:25:25 AM: lerna info ci enabled
1:25:26 AM: lerna WARN bootstrap Skipping recursive execution
1:25:26 AM: $ husky install
1:25:26 AM: husky - Git hooks installed
1:25:26 AM: Done in 1.73s.
1:25:26 AM: $ husky install
1:25:26 AM: husky - Git hooks installed
1:25:26 AM: Done in 89.55s.
1:25:26 AM: NPM modules installed using Yarn
1:25:26 AM: Started restoring cached go cache
1:25:26 AM: Finished restoring cached go cache
1:25:26 AM: go version go1.14.4 linux/amd64
1:25:26 AM: go version go1.14.4 linux/amd64
1:25:26 AM: Installing missing commands
1:25:26 AM: Verify run directory
1:25:27 AM:
1:25:27 AM: ────────────────────────────────────────────────────────────────
1:25:27 AM: Netlify Build
1:25:27 AM: ────────────────────────────────────────────────────────────────
1:25:27 AM:
1:25:27 AM: ❯ Version
1:25:27 AM: @netlify/build 12.4.0
1:25:27 AM:
1:25:27 AM: ❯ Flags
1:25:27 AM: deployId: 60d0cb18d6b4ac0008fa5652
1:25:27 AM:
1:25:27 AM: ❯ Current directory
1:25:27 AM: /opt/build/repo
1:25:27 AM:
1:25:27 AM: ❯ Config file
1:25:27 AM: /opt/build/repo/netlify.toml
1:25:27 AM:
1:25:27 AM: ❯ Context
1:25:27 AM: production
1:25:27 AM:
1:25:27 AM: ❯ Loading plugins
1:25:27 AM: - @netlify/[email protected] from netlify.toml and package.json
1:25:27 AM:
1:25:27 AM: ────────────────────────────────────────────────────────────────
1:25:27 AM: 1. onPreBuild command from @netlify/plugin-nextjs
1:25:27 AM: ────────────────────────────────────────────────────────────────
1:25:27 AM:
1:25:27 AM: ** Warning: support for Next.js >=11.0.0 is experimental **
1:25:28 AM: info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
1:25:28 AM: Next.js cache restored.
1:25:28 AM:
1:25:28 AM: (@netlify/plugin-nextjs onPreBuild completed in 880ms)
1:25:28 AM:
1:25:28 AM: ────────────────────────────────────────────────────────────────
1:25:28 AM: 2. build.command from netlify.toml
1:25:28 AM: ────────────────────────────────────────────────────────────────
1:25:28 AM:
1:25:28 AM: $ yarn build-web; ls -alh web/.next/; ls -alh web/.next/static
1:25:28 AM: yarn run v1.22.10
1:25:28 AM: $ lerna bootstrap && (cd web && yarn build)
1:25:29 AM: lerna notice cli v4.0.0
1:25:29 AM: lerna info ci enabled
1:25:29 AM: lerna info bootstrap root only
1:25:29 AM: [1/4] Resolving packages...
1:25:30 AM: success Already up-to-date.
1:25:30 AM: $ lerna bootstrap
1:25:31 AM: lerna notice cli v4.0.0
1:25:31 AM: lerna info ci enabled
1:25:31 AM: lerna WARN bootstrap Skipping recursive execution
1:25:31 AM: $ husky install
1:25:31 AM: husky - Git hooks installed
1:25:31 AM: $ next build
1:25:32 AM: info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
1:25:32 AM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
1:25:32 AM: info - Checking validity of types...
1:25:39 AM: info - Creating an optimized production build...
1:25:44 AM: warn - You have enabled the JIT engine which is currently in preview.
1:25:44 AM: warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
1:26:02 AM: (node:1908) [DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE] DeprecationWarning: Chunk.hasEntryModule: Use new ChunkGraph API
1:26:02 AM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:26:03 AM: warn - Compiled with warnings
1:26:03 AM: ../node_modules/next/dist/next-server/server/load-components.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: ../node_modules/next/dist/next-server/server/load-components.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: ../node_modules/next/dist/next-server/server/load-components.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: ../node_modules/next/dist/next-server/server/require.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: ../node_modules/next/dist/next-server/server/require.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: ../node_modules/next/dist/next-server/server/require.js
1:26:03 AM: Critical dependency: the request of a dependency is an expression
1:26:03 AM: info - Collecting page data...
1:26:04 AM: info - Generating static pages (0/8)
1:26:05 AM: info - Generating static pages (2/8)
1:26:06 AM: info - Generating static pages (4/8)
1:26:06 AM: info - Generating static pages (6/8)
1:26:06 AM: info - Generating static pages (8/8)
1:26:06 AM: info - Finalizing page optimization...
1:26:06 AM: Page Size First Load JS
1:26:06 AM: ┌ ○ / 1.18 kB 69.5 kB
1:26:06 AM: ├ /_app 0 B 64.9 kB
1:26:06 AM: ├ ○ /404 3.18 kB 68.1 kB
1:26:06 AM: ├ λ /api/exit-preview 0 B 64.9 kB
1:26:06 AM: ├ λ /api/preview 0 B 64.9 kB
1:26:06 AM: └ ● /posts/[slug] 40.5 kB 109 kB
1:26:06 AM: ├ /posts/first-live-post
1:26:06 AM: ├ /posts/the-third-of-all
1:26:06 AM: ├ /posts/my-only-post
1:26:06 AM: └ [+2 more paths]
1:26:06 AM: + First Load JS shared by all 64.9 kB
1:26:06 AM: ├ chunks/framework.f076ac.js 42.4 kB
1:26:06 AM: ├ chunks/main.0961e7.js 20.3 kB
1:26:06 AM: ├ chunks/pages/_app.21c550.js 556 B
1:26:06 AM: ├ chunks/webpack.cbce84.js 1.67 kB
1:26:06 AM: └ css/46e6c94abbf9326e3feb.css 2.84 kB
1:26:06 AM: λ (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps)
1:26:06 AM: ○ (Static) automatically rendered as static HTML (uses no initial props)
1:26:06 AM: ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
1:26:06 AM: (ISR) incremental static regeneration (uses revalidate in getStaticProps)
1:26:06 AM: Done in 37.46s.
1:26:06 AM: total 52K
1:26:06 AM: drwxr-xr-x 5 buildbot nogroup 4.0K Jun 21 17:26 .
1:26:06 AM: drwxr-xr-x 9 buildbot root 4.0K Jun 21 17:25 ..
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 21 Jun 21 17:26 BUILD_ID
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 1.5K Jun 21 17:25 build-manifest.json
1:26:06 AM: drwxr-xr-x 3 buildbot nogroup 4.0K Jun 21 17:25 cache
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 94 Jun 21 17:26 export-marker.json
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 275 Jun 21 17:26 images-manifest.json
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 1.4K Jun 21 17:26 prerender-manifest.json
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 178 Jun 21 17:25 react-loadable-manifest.json
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 1.6K Jun 21 17:26 required-server-files.json
1:26:06 AM: -rw-r--r-- 1 buildbot nogroup 595 Jun 21 17:26 routes-manifest.json
1:26:06 AM: drwxr-xr-x 4 buildbot nogroup 4.0K Jun 21 17:26 serverless
1:26:06 AM: drwxr-xr-x 5 buildbot nogroup 4.0K Jun 21 17:25 static
1:26:06 AM: total 20K
1:26:06 AM: drwxr-xr-x 5 buildbot nogroup 4.0K Jun 21 17:25 .
1:26:06 AM: drwxr-xr-x 5 buildbot nogroup 4.0K Jun 21 17:26 ..
1:26:06 AM: drwxr-xr-x 2 buildbot nogroup 4.0K Jun 21 17:25 4WnbzgNsJ3WqtCFTJRmau
1:26:06 AM: drwxr-xr-x 3 buildbot nogroup 4.0K Jun 21 17:25 chunks
1:26:06 AM: drwxr-xr-x 2 buildbot nogroup 4.0K Jun 21 17:25 css
1:26:06 AM:
1:26:06 AM: (build.command completed in 37.8s)
1:26:06 AM:
1:26:06 AM: ────────────────────────────────────────────────────────────────
1:26:06 AM: 3. onBuild command from @netlify/plugin-nextjs
1:26:06 AM: ────────────────────────────────────────────────────────────────
1:26:06 AM:
1:26:06 AM: ** Running Next on Netlify package **
1:26:06 AM: 🚀 Next on Netlify 🚀
1:26:06 AM:
1:26:06 AM: ────────────────────────────────────────────────────────────────
1:26:06 AM: Plugin "@netlify/plugin-nextjs" internal error
1:26:06 AM: ────────────────────────────────────────────────────────────────
1:26:06 AM:
1:26:06 AM: Error message
1:26:06 AM: Error: No static assets found in .next dist (aka no /.next/static). Please check your project configuration. Your next.config.js must be one of `serverless` or `experimental-serverless-trace`. Your build command should include `next build`.
1:26:06 AM:
1:26:06 AM: Plugin details
1:26:06 AM: Package: @netlify/plugin-nextjs
1:26:06 AM: Version: 3.4.2
1:26:06 AM: Repository: git+https://github.com/netlify/netlify-plugin-nextjs.git
1:26:06 AM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
1:26:06 AM: Report issues: https://github.com/netlify/netlify-plugin-nextjs/issues
1:26:06 AM:
1:26:06 AM: Error location
1:26:06 AM: In "onBuild" event in "@netlify/plugin-nextjs" from netlify.toml and package.json
1:26:06 AM: at copyNextAssets (/opt/build/repo/node_modules/@netlify/plugin-nextjs/src/lib/steps/copyNextAssets.js:14:11)
1:26:06 AM: at async build (/opt/build/repo/node_modules/@netlify/plugin-nextjs/src/index.js:25:3)
1:26:06 AM: at async nextOnNetlify (/opt/build/repo/node_modules/@netlify/plugin-nextjs/src/index.js:75:5)
1:26:06 AM: at async onBuild (/opt/build/repo/node_modules/@netlify/plugin-nextjs/index.js:75:5)
1:26:06 AM: at async Object.run (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/run.js:20:3)
1:26:06 AM: at async handleEvent (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js:36:38)
1:26:06 AM: at async process.<anonymous> (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/ipc.js:103:16)
1:26:06 AM:
1:26:06 AM: Resolved config
1:26:06 AM: build:
1:26:06 AM: base: /opt/build/repo
1:26:06 AM: command: yarn build-web; ls -alh web/.next/; ls -alh web/.next/static
1:26:06 AM: commandOrigin: config
1:26:06 AM: environment:
1:26:06 AM: - NEXT_PUBLIC_SANITY_DATASET
1:26:06 AM: - NEXT_PUBLIC_SANITY_PROJECT_ID
1:26:06 AM: - SANITY_API_TOKEN
1:26:06 AM: - SANITY_PREVIEW_SECRET
1:26:06 AM: publish: /opt/build/repo/web/.next
1:26:06 AM: functions:
1:26:06 AM: '*': {}
1:26:06 AM: plugins:
1:26:06 AM: - inputs: {}
1:26:06 AM: origin: config
1:26:06 AM: package: '@netlify/plugin-nextjs' netlify.toml [build]
base = "/"
publish = "/web/.next/" # or /web/ for that matter
command = "yarn build-web; ls -alh web/.next/; ls -alh web/.next/static"
[[plugins]]
package = "@netlify/plugin-nextjs" next.config.js const nextConfig = {
reactStrictMode: true,
target: 'serverless',
future: undefined,
experimental: undefined,
};
module.exports = nextConfig; Scripts: # root
"build-web": "lerna bootstrap && (cd web && yarn build)",
# web
"build": "next build",
monorepo structure:
|
Looks like I can get it to pick up the files if I set my Build log2:01:04 AM: Packaging Functions from netlify/functions directory:
2:01:04 AM: - next_image.js
2:01:04 AM: - next_api_exitpreview/next_api_exitpreview.js
2:01:04 AM: - next_api_preview/next_api_preview.js
2:01:04 AM: - next_posts_slug/next_posts_slug.js
2:01:04 AM:
2:01:07 AM:
2:01:07 AM: ────────────────────────────────────────────────────────────────
2:01:07 AM: Dependencies installation error
2:01:07 AM: ────────────────────────────────────────────────────────────────
2:01:07 AM:
2:01:07 AM: Error message
2:01:07 AM: A Netlify Function failed to require one of its dependencies.
2:01:07 AM: Please make sure it is present in the site's top-level "package.json".
2:01:07 AM: In file "/opt/build/repo/netlify/functions/next_posts_slug/next_posts_slug.js"
2:01:07 AM: Cannot find module 'critters'
2:01:07 AM: Require stack:
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/resolve.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/index.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/commands/get.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/main.js
2:01:07 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/bin.js |
@pzi hey! thanks for letting us know what's going on in your monorepo setup. helpful for us moving forward! if you wanted to provide us with a repo we can test against once we address all these issues, that would be even more helpful! #323 could possibly guide you on how to set your publish dir and next dist. also, per https://nextjs.org/docs/api-reference/next.config.js/setting-a-custom-build-directory, your distDir should not go up to parent dirs. not sure why you're seeing cannot find module critters, it's an outdated issue 🤔 . possibly try adding |
note: esbuild breaks dynamic imports, if you're using those in your site. we're working on a fix for this! |
Oh, I totally agree I shouldn’t have to set the distDir to go one dir up :) I just did that to check if the plugin considers the publish dir. Unfortunately, for now at least, the repo is private and I can’t share it. I will give the changes and maybe esbuild a try later, thanks for looking into it! |
It feels like that something like the below might address the issue we are experiencing? const getNextDistDir = async (publishPath) => {
const nextConfig = await getNextConfig()
return join(publishPath, nextConfig.distDir)
} |
@pzi yep thats basically what we go over here: #323 (comment) :) |
I've written up a summary of this and related issues, along with some potential solutions in a new issue: #433 |
hey all! thanks for your patience on this. per matt's issue #433, we'll close this in favor of that. please follow along and leave feedback there, but we'll try to circle back here, too, whenever we release support! 🙏 |
Could anyone who experienced this try installing |
… v4 (#390) * test: add setup replicating runtime v4 next/image handling to test handling of potentially browser-cached v4 image handling redirects * fix: handle ipx redirect that visitors might have browser cached from v4
Describe the bug
I am using monorepo in my project.
Monorepo foloder structure is
I have netlify.toml file in app folder and next.config.js in frontend folder.
This is next.config.js file
And this is netlify.toml file
But I am getting an error as the title of this issue.
Expected behavior
A clear and concise description of what you expected to happen.
Versions
If you're using the CLI to build
The text was updated successfully, but these errors were encountered: