NUXT Fatal Error?

I’m still a bit new to all this so do be kind. I somehow have a failing build (worked fine locally) and a revert back to a previous version hasn’t solved the error? Any tips on how to tackle this would be much appreciated.

Netlify site: https://p2v-blog.netlify.app

6:02:50 PM: Build ready to start
6:02:52 PM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
6:02:52 PM: build-image tag: v3.7.1
6:02:52 PM: buildbot version: 7f6e791c87eb170e7c519e73c3c0a0eca9a85dfa
6:02:52 PM: Fetching cached dependencies
6:02:52 PM: Starting to download cache of 157.7MB
6:02:55 PM: Finished downloading cache in 2.826257142s
6:02:55 PM: Starting to extract cache
6:03:01 PM: Finished extracting cache in 5.580887542s
6:03:01 PM: Finished fetching cache in 8.534999293s
6:03:01 PM: Starting to prepare the repo for build
6:03:02 PM: Preparing Git Reference refs/heads/main
6:03:05 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'dist' versus 'dist/' in the Netlify UI
6:03:05 PM: Starting build script
6:03:05 PM: Installing dependencies
6:03:05 PM: Python version set to 2.7
6:03:06 PM: Started restoring cached node version
6:03:08 PM: Finished restoring cached node version
6:03:09 PM: v12.18.0 is already installed.
6:03:09 PM: Now using node v12.18.0 (npm v6.14.4)
6:03:10 PM: Started restoring cached build plugins
6:03:10 PM: Finished restoring cached build plugins
6:03:10 PM: Attempting ruby version 2.7.1, read from environment
6:03:11 PM: Using ruby version 2.7.1
6:03:11 PM: Using PHP version 5.6
6:03:11 PM: Started restoring cached node modules
6:03:11 PM: Finished restoring cached node modules
6:03:12 PM: Installing NPM modules using NPM version 6.14.4
6:03:30 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
6:03:30 PM: > core-js@3.10.1 postinstall /opt/build/repo/node_modules/core-js
6:03:30 PM: > node -e "try{require('./postinstall')}catch(e){}"
6:03:30 PM: > nuxt@2.15.4 postinstall /opt/build/repo/node_modules/nuxt
6:03:30 PM: > opencollective || exit 0
6:03:31 PM: npm WARN eslint-config-prettier@7.2.0 requires a peer of eslint@>=7.0.0 but none is installed. You must install peer dependencies yourself.
6:03:31 PM: npm WARN eslint-plugin-prettier@3.3.1 requires a peer of eslint@>=5.0.0 but none is installed. You must install peer dependencies yourself.
6:03:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
6:03:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:03:31 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
6:03:31 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:03:31 PM: added 92 packages from 31 contributors, removed 140 packages, updated 117 packages and audited 2178 packages in 18.589s
6:03:32 PM: 180 packages are looking for funding
6:03:32 PM:   run `npm fund` for details
6:03:32 PM: found 0 vulnerabilities
6:03:32 PM: NPM modules installed
6:03:33 PM: Started restoring cached go cache
6:03:33 PM: Finished restoring cached go cache
6:03:33 PM: go version go1.14.4 linux/amd64
6:03:33 PM: go version go1.14.4 linux/amd64
6:03:33 PM: Installing missing commands
6:03:33 PM: Verify run directory
6:03:34 PM: ​
6:03:34 PM: ────────────────────────────────────────────────────────────────
6:03:34 PM:   Netlify Build                                                 
6:03:34 PM: ────────────────────────────────────────────────────────────────
6:03:34 PM: ​
6:03:34 PM: ❯ Version
6:03:34 PM:   @netlify/build 10.2.7
6:03:34 PM: ​
6:03:34 PM: ❯ Flags
6:03:34 PM:   deployId: 6075c0aa6321ed0007bf807e
6:03:34 PM: ​
6:03:34 PM: ❯ Current directory
6:03:34 PM:   /opt/build/repo
6:03:34 PM: ​
6:03:34 PM: ❯ Config file
6:03:34 PM:   No config file was defined: using default values.
6:03:34 PM: ​
6:03:34 PM: ❯ Context
6:03:34 PM:   production
6:03:34 PM: ​
6:03:34 PM: ────────────────────────────────────────────────────────────────
6:03:34 PM:   1. Build command from Netlify app                             
6:03:34 PM: ────────────────────────────────────────────────────────────────
6:03:34 PM: ​
6:03:34 PM: $ npm run generate
6:03:35 PM: > p2v-blog@1.0.0 generate /opt/build/repo
6:03:35 PM: > nuxt generate
6:03:57 PM: [fatal] Nuxt build error
6:03:57 PM:   ERROR in ./pages/blog/_slug.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/blog/_slug.vue?vue&type=script&lang=js&)
6:03:57 PM:   Module not found: Error: Can't resolve 'reading-time' in 'pages/blog'  @ ./pages/blog/_slug.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/blog/_slug.vue?vue&type=script&lang=js&) 36:18-41
6:03:57 PM:   @ ./pages/blog/_slug.vue?vue&type=script&lang=js&
6:03:57 PM:   @ ./pages/blog/_slug.vue
6:03:57 PM:   @ ./node_modules/.cache/nuxt/router.js
6:03:57 PM:   @ ./node_modules/.cache/nuxt/index.js
6:03:57 PM:   @ ./node_modules/.cache/nuxt/client.js
6:03:57 PM:   @ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
6:03:57 PM: 
6:03:57 PM:    ╭─────────────────────────────╮
6:03:57 PM:    │                             │
6:03:57 PM:    │   ✖ Nuxt Fatal Error        │
6:03:57 PM:    │                             │
6:03:57 PM:    │   Error: Nuxt build error   │
6:03:57 PM:    │                             │
6:03:57 PM:    ╰─────────────────────────────╯
6:03:57 PM: 
6:03:57 PM: npm ERR! code ELIFECYCLE
6:03:57 PM: npm ERR! errno 1
6:03:57 PM: npm ERR! p2v-blog@1.0.0 generate: `nuxt generate`
6:03:57 PM: npm ERR! Exit status 1
6:03:57 PM: npm ERR!
6:03:57 PM: npm ERR! Failed at the p2v-blog@1.0.0 generate script.
6:03:57 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
6:03:57 PM: npm ERR! A complete log of this run can be found in:
6:03:57 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-04-13T16_03_57_261Z-debug.log
6:03:57 PM: ​
6:03:57 PM: ────────────────────────────────────────────────────────────────
6:03:57 PM:   "build.command" failed                                        
6:03:57 PM: ────────────────────────────────────────────────────────────────
6:03:57 PM: ​
6:03:57 PM:   Error message
6:03:57 PM:   Command failed with exit code 1: npm run generate
6:03:57 PM: ​
6:03:57 PM:   Error location
6:03:57 PM:   In Build command from Netlify app:
6:03:57 PM:   npm run generate
6:03:57 PM: ​
6:03:57 PM:   Resolved config
6:03:57 PM:   build:
6:03:57 PM:     command: npm run generate
6:03:57 PM:     commandOrigin: ui
6:03:57 PM:     publish: /opt/build/repo/dist
6:03:57 PM: Caching artifacts
6:03:57 PM: Started saving node modules
6:03:57 PM: Finished saving node modules
6:03:57 PM: Started saving build plugins
6:03:57 PM: Finished saving build plugins
6:03:57 PM: Started saving pip cache
6:03:57 PM: Finished saving pip cache
6:03:57 PM: Started saving emacs cask dependencies
6:03:57 PM: Finished saving emacs cask dependencies
6:03:57 PM: Started saving maven dependencies
6:03:57 PM: Finished saving maven dependencies
6:03:57 PM: Started saving boot dependencies
6:03:57 PM: Finished saving boot dependencies
6:03:57 PM: Started saving rust rustup cache
6:03:57 PM: Finished saving rust rustup cache
6:03:57 PM: Started saving go dependencies
6:03:57 PM: Finished saving go dependencies
6:03:57 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:03:57 PM: Creating deploy upload records
6:03:58 PM: Failing build: Failed to build site
6:03:58 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
6:03:58 PM: Finished processing build request in 1m5.674356491s

There’s some module missing or the case is different. Check your repo and see if all files are exactly the same as local.

1 Like

THANKS! I somehow missed that and I managed to fix it now :slight_smile: