Home
Support Forums

Nextjs application deployment fails

We have problems building our Next.js application which still worked two days ago.

The new plugin @netlify/plugin-nextjs throws errors for our building command from netlify.toml:

[build]
  command = "npm run build && npm run export"
  publish = "out"

Besides that the compilation failed showing some package not in our package-json.lock file:

9:43:59 PM: ModuleNotFoundError: Module not found: Error: Can't resolve 'asciify-image' in '/opt/build/repo/node_modules/probe.gl/dist/es5/lib'
9:43:59 PM: > Build error occurred
9:43:59 PM: Error: > Build failed because of webpack errors
9:43:59 PM:     at /opt/build/repo/node_modules/next/dist/build/index.js:17:924
9:43:59 PM:     at async Span.traceAsyncFn (/opt/build/repo/node_modules/next/dist/telemetry/trace/trace.js:6:584)

Here is the working build output from 13th of July:

12:25:48 PM: Build ready to start
12:25:50 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
12:25:50 PM: build-image tag: v3.8.0
12:25:50 PM: buildbot version: d9a660540b05c414edfc0246347871ef0e3afee9
12:25:50 PM: Fetching cached dependencies
12:25:50 PM: Starting to download cache of 379.5MB
12:25:58 PM: Finished downloading cache in 8.029852652s
12:25:58 PM: Starting to extract cache
12:26:12 PM: Finished extracting cache in 13.885651646s
12:26:12 PM: Finished fetching cache in 22.007828033s
12:26:12 PM: Starting to prepare the repo for build
12:26:13 PM: Preparing Git Reference refs/heads/develop
12:26:14 PM: Parsing package.json dependencies
12:26:15 PM: Starting build script
12:26:15 PM: Installing dependencies
12:26:15 PM: Python version set to 2.7
12:26:15 PM: Started restoring cached node version
12:26:18 PM: Finished restoring cached node version
12:26:18 PM: v12.18.0 is already installed.
12:26:19 PM: Now using node v12.18.0 (npm v6.14.4)
12:26:19 PM: Started restoring cached build plugins
12:26:19 PM: Finished restoring cached build plugins
12:26:19 PM: Attempting ruby version 2.7.1, read from environment
12:26:20 PM: Started restoring cached ruby version
12:26:20 PM: Finished restoring cached ruby version
12:26:22 PM: Using ruby version 2.7.1
12:26:22 PM: Using PHP version 5.6
12:26:22 PM: Started restoring cached node modules
12:26:22 PM: Finished restoring cached node modules
12:26:22 PM: Installing NPM modules using NPM version 6.14.4
12:26:35 PM: npm WARN @deck.gl/react@7.3.15 requires a peer of react@0.14.x - 16.x but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN @deck.gl/react@7.3.15 requires a peer of react-dom@0.14.x - 16.x but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN @material-ui/lab@4.0.0-alpha.56 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN @material-ui/lab@4.0.0-alpha.56 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN @material-ui/utils@4.10.2 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN @material-ui/utils@4.10.2 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN layer-manager@3.0.9 requires a peer of react@^16.3.2 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN mapbox-gl-draw@0.16.0 requires a peer of mapbox-gl@^0.27.0 || ^0.28.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-async-script-loader@0.3.0 requires a peer of react@^15.5.4 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-insta-stories@2.1.3 requires a peer of react@^16.8.2 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-mapbox-gl@5.1.1 requires a peer of react@^16.11.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-mapbox-gl@5.1.1 requires a peer of react-dom@^16.11.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-mapbox-gl-draw@2.0.4 requires a peer of react-mapbox-gl@^4.8.1 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-sortable-hoc@1.11.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN react-sortable-hoc@1.11.0 requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN vizzuality-components@3.0.3 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN vizzuality-components@3.0.3 requires a peer of react-dom@^16.0.0 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN layer-manager@1.15.3 requires a peer of react@^16.3.2 but none is installed. You must install peer dependencies yourself.
12:26:35 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
12:26:35 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:26:35 PM: updated 1 package and audited 2078 packages in 11.74s
12:26:36 PM: 122 packages are looking for funding
12:26:36 PM:   run `npm fund` for details
12:26:36 PM: found 3932 vulnerabilities (6 low, 82 moderate, 3844 high)
12:26:36 PM:   run `npm audit fix` to fix them, or `npm audit` for details
12:26:36 PM: NPM modules installed
12:26:36 PM: Started restoring cached go cache
12:26:36 PM: Finished restoring cached go cache
12:26:36 PM: go version go1.14.4 linux/amd64
12:26:36 PM: go version go1.14.4 linux/amd64
12:26:36 PM: Installing missing commands
12:26:36 PM: Verify run directory
12:26:37 PM: ​
12:26:37 PM: ────────────────────────────────────────────────────────────────
12:26:37 PM:   Netlify Build
12:26:37 PM: ────────────────────────────────────────────────────────────────
12:26:37 PM: ​
12:26:37 PM: ❯ Version
12:26:37 PM:   @netlify/build 15.11.2
12:26:37 PM: ​
12:26:37 PM: ❯ Flags
12:26:37 PM:   deployId: 60ed6a2c1c3417000751fd23
12:26:37 PM: ​
12:26:37 PM: ❯ Current directory
12:26:37 PM:   /opt/build/repo
12:26:37 PM: ​
12:26:37 PM: ❯ Config file
12:26:37 PM:   /opt/build/repo/netlify.toml
12:26:37 PM: ​
12:26:37 PM: ❯ Context
12:26:37 PM:   production
12:26:37 PM: ​
12:26:37 PM: ❯ Loading plugins
12:26:37 PM:    - @netlify/plugin-nextjs@3.6.3 from Netlify app
12:26:37 PM:    - netlify-plugin-next-dynamic@1.0.9 from netlify.toml
12:26:37 PM:    - netlify-plugin-cache-nextjs@1.4.0 from netlify.toml
12:26:38 PM: ​
12:26:38 PM: ────────────────────────────────────────────────────────────────
12:26:38 PM:   1. onPreBuild command from @netlify/plugin-nextjs
12:26:38 PM: ────────────────────────────────────────────────────────────────
12:26:38 PM: ​
12:26:38 PM: Using Next.js 10.2.3
12:26:38 PM: NOTE: Static HTML export Next.js projects (projects that use `next export`) do not require most of this plugin. For these sites, this plugin *only* caches builds.
12:26:38 PM: ​
12:26:38 PM: (@netlify/plugin-nextjs onPreBuild completed in 14ms)
12:26:38 PM: ​
12:26:38 PM: ────────────────────────────────────────────────────────────────
12:26:38 PM:   2. onPreBuild command from netlify-plugin-cache-nextjs
12:26:38 PM: ────────────────────────────────────────────────────────────────
12:26:38 PM: ​
12:26:39 PM: Restored the cached .next folder at the location `.next/cache`
12:26:39 PM: ​
12:26:39 PM: (netlify-plugin-cache-nextjs onPreBuild completed in 1.2s)
12:26:39 PM: ​
12:26:39 PM: ────────────────────────────────────────────────────────────────
12:26:39 PM:   3. build.command from netlify.toml
12:26:39 PM: ────────────────────────────────────────────────────────────────
12:26:39 PM: ​
12:26:39 PM: $ npm run build && npm run export
12:26:39 PM: > planet-web2@0.2.0 build /opt/build/repo
12:26:39 PM: > next build
12:26:40 PM: info  - Loaded env from /opt/build/repo/.env.production
12:26:40 PM: info  - Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5
12:26:40 PM: info  - Skipping validation of types...
12:26:41 PM: info  - Creating an optimized production build...
12:26:43 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
12:29:18 PM: info  - Compiled successfully
12:29:18 PM: info  - Collecting page data...
2:29:25 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:28 PM: info  - Generating static pages (0/18)
12:29:34 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:39 PM: info  - Generating static pages (4/18)
12:29:39 PM: info  - Generating static pages (8/18)
12:29:39 PM: info  - Generating static pages (13/18)
12:29:40 PM: info  - Generating static pages (18/18)
12:29:40 PM: info  - Finalizing page optimization...
12:29:40 PM: Page                                Size     First Load JS
12:29:40 PM: ┌ ○ /                               6.66 kB        1.14 MB
12:29:40 PM: ├   └ css/577e54f4413d934d5665.css  1.05 kB
12:29:40 PM: ├   /_app                           0 B             991 kB
12:29:40 PM: ├ ○ /[p]                            12.5 kB        1.17 MB
12:29:40 PM: ├   └ css/61b6064b256b63d46374.css  2.27 kB
12:29:40 PM: ├ ○ /404                            2.95 kB        1.03 MB
12:29:40 PM: ├ ○ /all                            4.96 kB        1.04 MB
12:29:40 PM: ├   └ css/5b89bc96b39a996dbf8c.css  2.5 kB
12:29:40 PM: ├ ○ /c/[id]                         8.08 kB        1.06 MB
12:29:40 PM: ├   └ css/efdd0ec1a158359a973b.css  2.77 kB
12:29:40 PM: ├ ○ /claim/[type]/[code]            3.09 kB         994 kB
12:29:40 PM: ├   └ css/ab2b15291179a4d5ae64.css  1.58 kB
12:29:40 PM: ├ ○ /complete-signup                5.3 kB          996 kB
12:29:40 PM: ├   └ css/e3725b7e5a88fd4c8b6e.css  1.36 kB
12:29:40 PM: ├ ○ /donation-payment/[code]        2.71 kB        1.03 MB
12:29:40 PM: ├ ○ /home                           4.17 kB        1.03 MB
12:29:40 PM: ├   └ css/02d16cf8f4703a541da8.css  5.92 kB
12:29:40 PM: ├ ○ /login                          1.14 kB         992 kB
12:29:40 PM: ├ ○ /manage-projects/[id]           888 B          1.16 MB
12:29:40 PM: ├ ○ /manage-projects/add-project    824 B          1.16 MB
12:29:40 PM: ├ ○ /open-app                       508 B          1.02 MB
12:29:40 PM: ├ ○ /payment-status                 583 B           991 kB
12:29:40 PM: ├ ○ /register-trees                 3.23 kB         994 kB
12:29:40 PM: ├   └ css/d2e9a63344db936d6be0.css  251 B
12:29:40 PM: ├ ○ /s/[id]                         663 B           991 kB
12:29:40 PM: ├ ○ /t/[id]                         33.4 kB        1.07 MB
12:29:40 PM: ├   └ css/567836263a73ea3c9d8f.css  7.42 kB
12:29:40 PM: └ ○ /verify-email                   7.51 kB        1.03 MB
12:29:40 PM:     └ css/3851dd7d77cb2115fcc3.css  1.46 kB
12:29:40 PM: + First Load JS shared by all       991 kB
12:29:40 PM:   ├ chunks/framework.ee7f4d.js      42.7 kB
12:29:40 PM:   ├ chunks/main.055bc8.js           19.6 kB
12:29:40 PM:   ├ chunks/pages/_app.0c6987.js     925 kB
12:29:40 PM:   ├ chunks/webpack.5084e5.js        3.28 kB
12:29:40 PM:   └ css/a6e08e84979736d6dca6.css    18.4 kB
12:29:40 PM: λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
12:29:40 PM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
12:29:40 PM: ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
12:29:40 PM:    (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
12:29:40 PM: > planet-web2@0.2.0 export /opt/build/repo
12:29:40 PM: > next export
12:29:41 PM: info  - Loaded env from /opt/build/repo/.env.production
12:29:41 PM: info  - Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5
12:29:41 PM: info  - using build directory: /opt/build/repo/.next
12:29:41 PM: warn  - rewrites, redirects, and headers are not applied when exporting your application, detected (redirects). See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
12:29:41 PM: info  - Copying "static build" directory
12:29:41 PM: info  - No "exportPathMap" found in "next.config.js". Generating map from "./pages"
12:29:41 PM: info  - Launching 7 workers
12:29:41 PM: info  - Exporting (0/18)
12:29:41 PM: info  - Copying "public" directory
12:29:47 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:47 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:47 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:47 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:48 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:48 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:48 PM: deck: deck.gl 7.3.15 - set deck.log.priority=1 (or higher) to trace attribute updates
12:29:51 PM: info  - Exporting (4/18)
12:29:51 PM: info  - Exporting (8/18)
12:29:52 PM: info  - Exporting (13/18)
12:29:52 PM: info  - Exporting (18/18)
12:29:52 PM: Export successful. Files written to /opt/build/repo/out
12:29:52 PM: ​
12:29:52 PM: (build.command completed in 3m 13s)
12:29:52 PM: ​
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM:   4. onBuild command from @netlify/plugin-nextjs
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM: ​
12:29:52 PM: NOTE: Static HTML export Next.js projects (projects that use `next export`) do not require most of this plugin. For these sites, this plugin *only* caches builds.
12:29:52 PM: ​
12:29:52 PM: (@netlify/plugin-nextjs onBuild completed in 5ms)
12:29:52 PM: ​
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM:   5. onPostBuild command from @netlify/plugin-nextjs
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM: ​
12:29:52 PM: NOTE: Static HTML export Next.js projects (projects that use `next export`) do not require most of this plugin. For these sites, this plugin *only* caches builds.
12:29:52 PM: ​
12:29:52 PM: (@netlify/plugin-nextjs onPostBuild completed in 4ms)
12:29:52 PM: ​
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM:   6. onPostBuild command from netlify-plugin-next-dynamic
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM: ​
12:29:52 PM: reading route manifest that being generated from next
12:29:52 PM: parsing routes
12:29:52 PM: appending redirects
12:29:52 PM: ​
12:29:52 PM: (netlify-plugin-next-dynamic onPostBuild completed in 9ms)
12:29:52 PM: ​
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM:   7. onPostBuild command from netlify-plugin-cache-nextjs
12:29:52 PM: ────────────────────────────────────────────────────────────────
12:29:52 PM: ​
12:29:53 PM: Cached the .next folder at the location `.next/cache`
12:29:53 PM: ​
12:29:53 PM: (netlify-plugin-cache-nextjs onPostBuild completed in 1.3s)
12:29:53 PM: ​
12:29:53 PM: ────────────────────────────────────────────────────────────────
12:29:53 PM:   8. Deploy site
12:29:53 PM: ────────────────────────────────────────────────────────────────
12:29:53 PM: ​
12:29:53 PM: Starting to deploy site from 'out'
12:29:54 PM: Creating deploy tree asynchronously
12:29:54 PM: Creating deploy upload records
12:29:56 PM: 19 new files to upload
12:29:56 PM: 0 new functions to upload
12:29:57 PM: Site deploy was successfully initiated
12:29:57 PM: ​
12:29:57 PM: (Deploy site completed in 3.1s)
12:29:57 PM: ​
12:29:57 PM: ────────────────────────────────────────────────────────────────
12:29:57 PM:   Netlify Build Complete
12:29:57 PM: ────────────────────────────────────────────────────────────────
12:29:57 PM: ​
12:29:57 PM: (Netlify Build completed in 3m 19.8s)
12:29:57 PM: Caching artifacts
12:29:57 PM: Started saving node modules
12:29:57 PM: Finished saving node modules
12:29:57 PM: Started saving build plugins
12:29:57 PM: Finished saving build plugins
12:29:57 PM: Started saving pip cache
12:29:57 PM: Starting post processing
12:29:57 PM: Post processing - HTML
12:29:57 PM: Finished saving pip cache
12:29:57 PM: Started saving emacs cask dependencies
12:29:57 PM: Finished saving emacs cask dependencies
12:29:57 PM: Started saving maven dependencies
12:29:57 PM: Finished saving maven dependencies
12:29:57 PM: Started saving boot dependencies
12:29:57 PM: Finished saving boot dependencies
12:29:57 PM: Started saving rust rustup cache
12:29:57 PM: Finished saving rust rustup cache
12:29:57 PM: Started saving go dependencies
12:29:57 PM: Finished saving go dependencies
12:29:57 PM: Build script success
12:29:59 PM: Post processing - header rules
12:29:59 PM: Post processing - redirect rules
12:29:59 PM: Post processing done
12:29:59 PM: Site is live ✨
12:31:02 PM: Finished processing build request in 5m12.330968104s

Here is the output from the failed build today (with clearing the cache, but it did also not worked with the cache not cleared before):

9:39:40 PM: Build ready to start
9:39:42 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
9:39:42 PM: build-image tag: v3.8.0
9:39:42 PM: buildbot version: fd2d744d8bfa914ebde93203088eebb12b66468e
9:39:42 PM: Building without cache
9:39:42 PM: Starting to prepare the repo for build
9:39:43 PM: No cached dependencies found. Cloning fresh repo
9:39:43 PM: git clone https://github.com/Plant-for-the-Planet-org/planet-webapp
9:39:48 PM: Preparing Git Reference refs/heads/develop
9:39:49 PM: Parsing package.json dependencies
9:39:50 PM: Starting build script
9:39:50 PM: Installing dependencies
9:39:50 PM: Python version set to 2.7
9:39:51 PM: v12.18.0 is already installed.
9:39:52 PM: Now using node v12.18.0 (npm v6.14.4)
9:39:52 PM: Started restoring cached build plugins
9:39:52 PM: Finished restoring cached build plugins
9:39:52 PM: Attempting ruby version 2.7.1, read from environment
9:39:53 PM: Required ruby-2.7.1 is not installed - installing.
9:39:53 PM: Searching for binary rubies, this might take some time.
9:39:54 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.7.1.tar.bz2
9:39:54 PM: Checking requirements for ubuntu.
9:39:54 PM: Requirements installation successful.
9:39:54 PM: ruby-2.7.1 - #configure
9:39:54 PM: ruby-2.7.1 - #download
9:39:55 PM: ruby-2.7.1 - #validate archive
9:40:00 PM: ruby-2.7.1 - #extract
9:40:03 PM: ruby-2.7.1 - #validate binary
9:40:03 PM: ruby-2.7.1 - #setup
9:40:04 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1@global
9:40:04 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
9:40:05 PM: ruby-2.7.1 - #generating global wrappers........
9:40:05 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
9:40:05 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
9:40:05 PM: ruby-2.7.1 - #generating default wrappers........
9:40:06 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
9:40:06 PM: Using ruby version 2.7.1
9:40:06 PM: Using PHP version 5.6
9:40:06 PM: Started restoring cached node modules
9:40:06 PM: Finished restoring cached node modules
9:40:07 PM: Installing NPM modules using NPM version 6.14.4
9:40:47 PM: > @sentry/cli@1.64.2 install /opt/build/repo/node_modules/@sentry/cli
9:40:47 PM: > node scripts/install.js
9:40:47 PM: info sentry-cli Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.64.2/sentry-cli-Linux-x86_64
9:40:48 PM: fetching sentry-cli-Linux-x86_64 1%
...
9:40:48 PM: fetching sentry-cli-Linux-x86_64 100%
9:40:48 PM: > core-js@3.14.0 postinstall /opt/build/repo/node_modules/@auth0/auth0-spa-js/node_modules/core-js
9:40:48 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:40:49 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/babel-register/node_modules/core-js
9:40:49 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:40:49 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
9:40:49 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:40:49 PM: > browser-tabs-lock@1.2.14 postinstall /opt/build/repo/node_modules/browser-tabs-lock
9:40:49 PM: > node scripts/postinstall.js
9:40:49 PM: Thank you for using browser-tabs-lock ( https://github.com/supertokens/browser-tabs-lock ).
9:40:49 PM: This library was created as a part of a larger project, SuperTokens( https://supertokens.io ) - the best session management solution.
9:40:49 PM: You can also check out our other projects on https://github.com/supertokens
9:40:49 PM: 
9:40:49 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
9:40:49 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:40:49 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure
9:40:49 PM: > node -e "try{require('./postinstall')}catch(e){}"
9:40:53 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
9:40:53 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:40:53 PM: added 2069 packages from 918 contributors and audited 2078 packages in 45.503s
9:40:54 PM: 122 packages are looking for funding
9:40:54 PM:   run `npm fund` for details
9:40:54 PM: found 3932 vulnerabilities (6 low, 82 moderate, 3844 high)
9:40:54 PM:   run `npm audit fix` to fix them, or `npm audit` for details
9:40:54 PM: NPM modules installed
9:40:55 PM: Started restoring cached go cache
9:40:55 PM: Finished restoring cached go cache
9:40:55 PM: go version go1.14.4 linux/amd64
9:40:55 PM: go version go1.14.4 linux/amd64
9:40:55 PM: Installing missing commands
9:40:55 PM: Verify run directory
9:40:56 PM: ​
9:40:56 PM: ────────────────────────────────────────────────────────────────
9:40:56 PM:   Netlify Build                                                 
9:40:56 PM: ────────────────────────────────────────────────────────────────
9:40:56 PM: ​
9:40:56 PM: ❯ Version
9:40:56 PM:   @netlify/build 15.11.5
9:40:56 PM: ​
9:40:56 PM: ❯ Flags
9:40:56 PM:   deployId: 60f08efca338b008e2c6dbb7
9:40:56 PM: ​
9:40:56 PM: ❯ Current directory
9:40:56 PM:   /opt/build/repo
9:40:56 PM: ​
9:40:56 PM: ❯ Config file
9:40:56 PM:   /opt/build/repo/netlify.toml
9:40:56 PM: ​
9:40:56 PM: ❯ Context
9:40:56 PM:   production
9:40:56 PM: ​
9:40:56 PM: ❯ Installing plugins
9:40:56 PM:    - @netlify/plugin-nextjs@3.7.0
9:40:56 PM:    - netlify-plugin-next-dynamic@1.0.9
9:40:56 PM:    - netlify-plugin-cache-nextjs@1.4.0
9:41:22 PM: ​
9:41:22 PM: ❯ Loading plugins
9:41:22 PM:    - @netlify/plugin-nextjs@3.7.0 from Netlify app
9:41:22 PM:    - netlify-plugin-next-dynamic@1.0.9 from netlify.toml
9:41:22 PM:    - netlify-plugin-cache-nextjs@1.4.0 from netlify.toml
9:41:23 PM: ​
9:41:23 PM: ────────────────────────────────────────────────────────────────
9:41:23 PM:   1. onPreBuild command from @netlify/plugin-nextjs             
9:41:23 PM: ────────────────────────────────────────────────────────────────
9:41:23 PM: ​
9:41:23 PM: Using Next.js 10.2.3
9:41:23 PM: There was an error parsing your build command Error: npm script "build && npm run export" not found
9:41:23 PM:     at parseNpmScript (/opt/build/repo/.netlify/plugins/node_modules/@netlify/parse-npm-script/lib/parser.js:73:11)
9:41:23 PM:     at parseNpmScript (/opt/build/repo/.netlify/plugins/node_modules/@netlify/parse-npm-script/lib/index.js:10:10)
9:41:23 PM:     at usesBuildCommand (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/helpers/usesBuildCommand.js:15:21)
9:41:23 PM:     at doesNotNeedPlugin (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/helpers/doesNotNeedPlugin.js:19:7)
9:41:23 PM:     at onPreBuild (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/index.js:30:9)
9:41:23 PM:     at Object.run (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/run.js:20:9)
9:41:23 PM:     at handleEvent (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js:36:61)
9:41:23 PM:     at /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js:30:61
9:41:23 PM:     at process.<anonymous> (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/ipc.js:103:22)
9:41:23 PM:     at process.emit (events.js:310:20)
9:41:23 PM: There was an error parsing your build command Error: npm script "build && npm run export" not found
9:41:23 PM:     at parseNpmScript (/opt/build/repo/.netlify/plugins/node_modules/@netlify/parse-npm-script/lib/parser.js:73:11)
9:41:23 PM:     at parseNpmScript (/opt/build/repo/.netlify/plugins/node_modules/@netlify/parse-npm-script/lib/index.js:10:10)
9:41:23 PM:     at usesBuildCommand (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/helpers/usesBuildCommand.js:15:21)
9:41:23 PM:     at isStaticExportProject (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/helpers/isStaticExportProject.js:9:26)
9:41:23 PM:     at doesNotNeedPlugin (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/helpers/doesNotNeedPlugin.js:26:10)
9:41:23 PM:     at onPreBuild (/opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/index.js:30:9)
9:41:23 PM:     at Object.run (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/run.js:20:9)
9:41:23 PM:     at handleEvent (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js:36:61)
9:41:23 PM:     at /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js:30:61
9:41:23 PM:     at process.<anonymous> (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/ipc.js:103:22)
9:41:23 PM: info  - Loaded env from /opt/build/repo/.env.production
9:41:23 PM: info  - Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5
9:41:23 PM: The "target" config property must be one of "serverless", "experimental-serverless-trace". Building with "serverless" target.
9:41:24 PM: info  - Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5
9:41:24 PM: No Next.js cache to restore.
9:41:24 PM: ​
9:41:24 PM: (@netlify/plugin-nextjs onPreBuild completed in 1s)
9:41:24 PM: ​
9:41:24 PM: ────────────────────────────────────────────────────────────────
9:41:24 PM:   2. onPreBuild command from netlify-plugin-cache-nextjs        
9:41:24 PM: ────────────────────────────────────────────────────────────────
9:41:24 PM: ​
9:41:24 PM: No cache found for the .next folder at the location `.next/cache`
9:41:24 PM: ​
9:41:24 PM: (netlify-plugin-cache-nextjs onPreBuild completed in 184ms)
9:41:24 PM: ​
9:41:24 PM: ────────────────────────────────────────────────────────────────
9:41:24 PM:   3. build.command from netlify.toml                            
9:41:24 PM: ────────────────────────────────────────────────────────────────
9:41:24 PM: ​
9:41:24 PM: $ npm run build && npm run export
9:41:24 PM: > planet-web2@0.2.0 build /opt/build/repo
9:41:24 PM: > next build
9:41:25 PM: info  - Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5
9:41:25 PM: info  - Skipping validation of types...
9:41:25 PM: info  - Creating an optimized production build...
9:41:26 PM: info  - Using external babel configuration from /opt/build/repo/.babelrc
9:43:59 PM: Failed to compile.
9:43:59 PM: 
9:43:59 PM: ModuleNotFoundError: Module not found: Error: Can't resolve 'asciify-image' in '/opt/build/repo/node_modules/probe.gl/dist/es5/lib'
9:43:59 PM: > Build error occurred
9:43:59 PM: Error: > Build failed because of webpack errors
9:43:59 PM:     at /opt/build/repo/node_modules/next/dist/build/index.js:17:924
9:43:59 PM:     at async Span.traceAsyncFn (/opt/build/repo/node_modules/next/dist/telemetry/trace/trace.js:6:584)
9:44:00 PM: npm ERR! code ELIFECYCLE
9:44:00 PM: npm ERR! errno 1
9:44:00 PM: npm ERR! planet-web2@0.2.0 build: `next build`
9:44:00 PM: npm ERR! Exit status 1
9:44:00 PM: npm ERR!
9:44:00 PM: npm ERR! Failed at the planet-web2@0.2.0 build script.
9:44:00 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
9:44:00 PM: npm ERR! A complete log of this run can be found in:
9:44:00 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-07-15T19_44_00_123Z-debug.log
9:44:00 PM: ​
9:44:00 PM: ────────────────────────────────────────────────────────────────
9:44:00 PM:   "build.command" failed                                        
9:44:00 PM: ────────────────────────────────────────────────────────────────
9:44:00 PM: ​
9:44:00 PM:   Error message
9:44:00 PM:   Command failed with exit code 1: npm run build && npm run export
9:44:00 PM: ​
9:44:00 PM:   Error location
9:44:00 PM:   In build.command from netlify.toml:
9:44:00 PM:   npm run build && npm run export
9:44:00 PM: ​
9:44:00 PM:   Resolved config
9:44:00 PM:   build:
9:44:00 PM:     command: npm run build && npm run export
9:44:00 PM:     commandOrigin: config
9:44:00 PM:     environment:
9:44:00 PM:       - API_ENDPOINT
9:44:00 PM:       - AUTH0_CLIENT_ID
9:44:00 PM:       - NEXTAUTH_URL
9:44:00 PM:       - NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
9:44:00 PM:       - TENANT
9:44:00 PM:       - TENANTID
9:44:00 PM:     publish: /opt/build/repo/out
9:44:00 PM:     publishOrigin: config
9:44:00 PM:   plugins:
9:44:00 PM:     - inputs: {}
9:44:00 PM:       origin: ui
9:44:00 PM:       package: '@netlify/plugin-nextjs'
9:44:00 PM:     - inputs: {}
9:44:00 PM:       origin: config
9:44:00 PM:       package: netlify-plugin-next-dynamic
9:44:00 PM:     - inputs: {}
9:44:00 PM:       origin: config
9:44:00 PM:       package: netlify-plugin-cache-nextjs
9:44:00 PM:   redirects:
9:44:00 PM:     - from: /account-activate/*      path: /account-activate/*      status: 301      to: /open-app    - from: /competition/*      path: /competition/*      status: 301      to: /open-app    - from: /donate-tree      path: /donate-tree      status: 301      to: /open-app    - from: /donate-trees      path: /donate-trees      status: 301      to: /open-app    - from: /donate-trees/*      path: /donate-trees/*      status: 301      to: /open-app    - from: /my-trees      path: /my-trees      status: 301      to: /login    - from: /project/*      path: /project/*      status: 301      to: /open-app    - from: /redeem      path: /redeem      status: 301      to: /login    - from: /reset-password/*      path: /reset-password/*      status: 301      to: /open-app    - from: /signup      path: /signup      status: 301      to: /open-app    - from: /signup/*      path: /signup/*      status: 301      to: /open-app    - from: /yucatan-reforestation      path: /yucatan-reforestation      status: 301      to: /yucatan  redirectsOrigin: configCaching artifacts
9:44:00 PM: Started saving node modules
9:44:00 PM: Finished saving node modules
9:44:00 PM: Started saving build plugins
9:44:00 PM: Finished saving build plugins
9:44:00 PM: Started saving pip cache
9:44:00 PM: Finished saving pip cache
9:44:00 PM: Started saving emacs cask dependencies
9:44:00 PM: Finished saving emacs cask dependencies
9:44:00 PM: Started saving maven dependencies
9:44:00 PM: Finished saving maven dependencies
9:44:00 PM: Started saving boot dependencies
9:44:00 PM: Finished saving boot dependencies
9:44:00 PM: Started saving rust rustup cache
9:44:00 PM: Finished saving rust rustup cache
9:44:00 PM: Started saving go dependencies
9:44:00 PM: Finished saving go dependencies

Would you try installing asciify-image - npm in your package.json to see if it helps?

Netlify updated their plugin @netlify/plugin-nextjs@3.7.1 and our builds work again now.

1 Like

Great to hear! Thanks for letting us know, @sagararyal :netliconfetti: