Nuxt Generate Breaking Build

Hello, I am new to Nuxt and I am having issues with getting continuous deployment going because of errors I have run into while building. The npm generate command is showing errors and causing my site to be unable to deploy directly from GitHub.
The issue seems to be something on Netlify, as I have been able to run the npm generate command on my local machine and get a dist folder with everything intact, but whenever I try with Netlify, it spits out the following errors.


12:11:36 AM: Build ready to start
12:11:38 AM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
12:11:38 AM: build-image tag: v3.3.7
12:11:38 AM: buildbot version: d305548225ac57bb00eb5a596b0b8674e76a4681
12:11:38 AM: Fetching cached dependencies
12:11:38 AM: Failed to fetch cache, continuing with build
12:11:38 AM: Starting to prepare the repo for build
12:11:39 AM: No cached dependencies found. Cloning fresh repo
12:11:39 AM: git clone https://github.com/jntechpro/aodillard
12:11:39 AM: Preparing Git Reference refs/heads/master
12:11:40 AM: Starting build script
12:11:40 AM: Installing dependencies
12:11:41 AM: Downloading and installing node v10.20.1...
12:11:42 AM: Downloading https://nodejs.org/dist/v10.20.1/node-v10.20.1-linux-x64.tar.xz...
12:11:42 AM: 
##########################
12:11:42 AM:                                              36.2%
12:11:42 AM: 
##########################
12:11:42 AM: ############################################## 100.0%
12:11:42 AM: Computing checksum with sha256sum
12:11:42 AM: Checksums matched!
12:11:45 AM: Now using node v10.20.1 (npm v6.14.4)
12:11:45 AM: Attempting ruby version 2.6.2, read from environment
12:11:47 AM: Using ruby version 2.6.2
12:11:47 AM: Using PHP version 5.6
12:11:47 AM: Started restoring cached node modules
12:11:47 AM: Finished restoring cached node modules
12:11:47 AM: Installing NPM modules using NPM version 6.14.4
12:12:11 AM: > node-sass@4.14.0 install /opt/build/repo/node_modules/node-sass
12:12:11 AM: > node scripts/install.js
12:12:12 AM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.0/linux-x64-64_binding.node
12:12:12 AM: Download complete
12:12:12 AM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
12:12:12 AM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.0/linux-x64-64_binding.node
12:12:12 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/core-js
12:12:12 AM: > node -e "try{require('./postinstall')}catch(e){}"
12:12:12 AM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
12:12:12 AM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
12:12:12 AM: > https://opencollective.com/core-js 
12:12:12 AM: > https://www.patreon.com/zloirock 
12:12:12 AM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
12:12:12 AM: > ejs@2.7.4 postinstall /opt/build/repo/node_modules/ejs
12:12:12 AM: > node ./postinstall.js
12:12:12 AM: Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
12:12:13 AM: > node-sass@4.14.0 postinstall /opt/build/repo/node_modules/node-sass
12:12:13 AM: > node scripts/build.js
12:12:13 AM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
12:12:13 AM: Testing binary
12:12:13 AM: Binary is fine
12:12:13 AM: > nuxt@2.12.2 postinstall /opt/build/repo/node_modules/nuxt
12:12:13 AM: > opencollective || exit 0
12:12:14 AM:                                      :-:
12:12:14 AM:                                    .==-+:
12:12:14 AM:                                   .==. :+- .-=-
12:12:14 AM:                                  .==.   :==++-+=.
12:12:14 AM:                                 :==.     -**: :+=.
12:12:14 AM:                                :+-      :*+++. .++.
12:12:14 AM:                               :+-      -*= .++: .=+.
12:12:14 AM:                              -+:      =*-   .+*: .=+:
12:12:14 AM:                             -+:     .=*-     .=*-  =+:
12:12:14 AM:                           .==:     .+*:        -*-  -+-
12:12:14 AM:                          .=+:.....:+*-.........:=*=..=*-
12:12:14 AM:                          .-=------=++============++====:
12:12:14 AM:                           Thanks for installing nuxtjs
12:12:14 AM:                  Please consider donating to our open collective
12:12:14 AM:                         to help us maintain this package.
12:12:14 AM:                            Number of contributors: 229
12:12:14 AM:                               Number of backers: 321
12:12:14 AM:                               Annual budget: $75,817
12:12:14 AM:                              Current balance: $26,466
12:12:14 AM:                  Donate: https://opencollective.com/nuxtjs/donate
12:12:15 AM: npm
12:12:15 AM:  WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/fsevents):
12:12:15 AM: npm WARN
12:12:15 AM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:12:15 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/chokidar/node_modules/fsevents):
12:12:15 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:12:15 AM: added 1445 packages from 630 contributors and audited 22701 packages in 26.891s
12:12:17 AM: 51 packages are looking for funding
12:12:17 AM:   run `npm fund` for details
12:12:17 AM: found 0 vulnerabilities
12:12:17 AM: NPM modules installed
12:12:17 AM: Started restoring cached go cache
12:12:17 AM: Finished restoring cached go cache
12:12:17 AM: unset GOOS;
12:12:17 AM: unset GOARCH;
12:12:17 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
12:12:17 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
12:12:17 AM: go version >&2;
12:12:17 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
12:12:17 AM: go version go1.12 linux/amd64
12:12:17 AM: Installing missing commands
12:12:17 AM: Verify run directory
12:12:17 AM: Executing user command: npm run generate
12:12:17 AM: > aaron@1.0.0 generate /opt/build/repo
12:12:17 AM: > nuxt generate
12:12:18 AM:  WARN  No .env file found in /opt/build/repo.
12:12:19 AM: โ„น Production build
12:12:19 AM: โœ” Builder initialized
12:12:19 AM: โœ” Nuxt files generated
12:12:20 AM: โ„น Compiling Client
12:12:36 AM: โœ” Client: Compiled with some errors in 15.46s
12:12:36 AM: Hash: 232be60340f969431479
12:12:36 AM: Version: webpack 4.43.0
12:12:36 AM: Time: 15460ms
12:12:36 AM: Built at: 04/30/2020 5:12:36 AM
12:12:36 AM:                   Asset       Size  Chunks               Chunk Names
12:12:36 AM: 29eed9007be5e105c952.js    2.4 KiB       7  [immutable]  runtime
12:12:36 AM: 49565ccdeb164ab326b8.js   5.23 KiB       5  [immutable]  pages/resume
12:12:36 AM: 7fc87c3e5e25df0abee7.js  681 bytes       6  [immutable]  pages/success
12:12:36 AM: 9256fc76ec4b11e1e13a.js    165 KiB       1  [immutable]  commons.app
12:12:36 AM:                LICENSES  389 bytes          
12:12:36 AM: a1765938b3f738b25a6c.js   2.26 KiB       4  [immutable]  pages/index
12:12:36 AM: c064d8b01078366b5e7a.js   4.14 KiB       3  [immutable]  pages/contact
12:12:36 AM: db78d6dfa963fcbcfe1b.js  640 bytes       2  [immutable]  pages/404
12:12:36 AM: eb31710632f16df89c08.js    237 KiB       0  [immutable]  app
12:12:36 AM: ee1ad303fce49ec579e9.js    388 KiB       8  [immutable]  vendors.app
12:12:36 AM: Entrypoint app = 29eed9007be5e105c952.js 9256fc76ec4b11e1e13a.js ee1ad303fce49ec579e9.js eb31710632f16df89c08.js
12:12:36 AM: ERROR in ./pages/index.vue?vue&type=template&id=76423d54& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=template&id=76423d54&)
12:12:36 AM: Module not found: Error: Can't resolve 'assets/profile.png' in '/opt/build/repo/pages'
12:12:36 AM:  @ ./pages/index.vue?vue&type=template&id=76423d54& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=template&id=76423d54&) 2:309-338
12:12:36 AM:  @ ./pages/index.vue?vue&type=template&id=76423d54&
12:12:36 AM:  @ ./pages/index.vue
12:12:36 AM:  @ ./.nuxt/router.js
12:12:36 AM:  @ ./.nuxt/index.js
12:12:36 AM:  @ ./.nuxt/client.js
12:12:36 AM:  @ multi ./.nuxt/client.js
12:12:36 AM: ERROR in ./layouts/default.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./layouts/default.vue?vue&type=script&lang=js&)
12:12:36 AM: Module not found: Error: Can't resolve '~components/footer' in '/opt/build/repo/layouts'
12:12:36 AM:  @ ./layouts/default.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./layouts/default.vue?vue&type=script&lang=js&) 10:0-40 14:12-18
12:12:36 AM:  @ ./layouts/default.vue?vue&type=script&lang=js&
12:12:36 AM:  @ ./layouts/default.vue
12:12:36 AM:  @ ./.nuxt/App.js
12:12:36 AM:  @ ./.nuxt/index.js
12:12:36 AM:  @ ./.nuxt/client.js
12:12:36 AM:  @ multi ./.nuxt/client.js
12:12:36 AM: ERROR in ./layouts/default.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./layouts/default.vue?vue&type=script&lang=js&)
12:12:36 AM: Module not found: Error: Can't resolve '~components/navbar' in '/opt/build/repo/layouts'
12:12:36 AM:  @ ./layouts/default.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./layouts/default.vue?vue&type=script&lang=js&) 9:0-40 13:12-18
12:12:36 AM:  @ ./layouts/default.vue?vue&type=script&lang=js&
12:12:36 AM:  @ ./layouts/default.vue
12:12:36 AM:  @ ./.nuxt/App.js
12:12:36 AM:  @ ./.nuxt/index.js
12:12:36 AM:  @ ./.nuxt/client.js
12:12:36 AM:  @ multi ./.nuxt/client.js
12:12:36 AM:  FATAL  Nuxt build error
12:12:36 AM:   at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5351:21)
12:12:36 AM:   at process._tickCallback (internal/process/next_tick.js:68:7)
12:12:36 AM:    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
12:12:36 AM:    โ”‚                             โ”‚
12:12:36 AM:    โ”‚   โœ– Nuxt Fatal Error        โ”‚
12:12:36 AM:    โ”‚                             โ”‚
12:12:36 AM:    โ”‚   Error: Nuxt build error   โ”‚
12:12:36 AM:    โ”‚                             โ”‚
12:12:36 AM:    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
12:12:36 AM: npm
12:12:36 AM:  ERR! code
12:12:36 AM:  ELIFECYCLE
12:12:36 AM: npm ERR! errno 1
12:12:36 AM: npm
12:12:36 AM: ERR! aaron@1.0.0 generate: `nuxt generate`
12:12:36 AM: npm ERR!
12:12:36 AM:  Exit status 1
12:12:36 AM: npm
12:12:36 AM: ERR!
12:12:36 AM: npm
12:12:36 AM: ERR! Failed at the aaron@1.0.0 generate script.
12:12:36 AM: npm
12:12:36 AM:  ERR! This is probably not a problem with npm. There is likely additional logging output above.
12:12:36 AM: npm
12:12:36 AM:  ERR! A complete log of this run can be found in:
12:12:36 AM: npm
12:12:36 AM: ERR!     /opt/buildhome/.npm/_logs/2020-04-30T05_12_36_193Z-debug.log
12:12:36 AM: Skipping functions preparation step: no functions directory set
12:12:36 AM: Caching artifacts
12:12:36 AM: Started saving node modules
12:12:36 AM: Finished saving node modules
12:12:36 AM: Started saving pip cache
12:12:36 AM: Finished saving pip cache
12:12:36 AM: Started saving emacs cask dependencies
12:12:36 AM: Finished saving emacs cask dependencies
12:12:36 AM: Started saving maven dependencies
12:12:36 AM: Finished saving maven dependencies
12:12:36 AM: Started saving boot dependencies
12:12:36 AM: Finished saving boot dependencies
12:12:36 AM: Started saving go dependencies
12:12:36 AM: Finished saving go dependencies
12:12:40 AM: Error running command: Build script returned non-zero exit code: 1
12:12:40 AM: Failing build: Failed to build site
12:12:40 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:12:40 AM: Finished processing build request in 1m2.777394884s

I know I can just manually upload the dist folder that was created locally, but I would prefer to just have it all automated with GitHub and Netlify. Any help figuring out this issue would be greatly appreciated!
Here is the current link to the site with the dist folder manually uploaded:

hey there, is there any chance that the above error is being caused by case issue?
this sometimes pops up when deploying after everything runs fine local:

It was that! My files locally were lowercased, but for whatever reason in GitHub, the first letter was capitalized which threw everything off. Thanks for your help!

1 Like