Home
Support Forums

Hi i can't seem to deploy my nuxt app on netlify, i've tried everything

This is my deploy log:


10:34:14 PM: Starting build script
10:34:14 PM: Installing dependencies
10:34:14 PM: Python version set to 2.7
10:34:15 PM: Downloading and installing node v16.8.0...
10:34:15 PM: Downloading https://nodejs.org/dist/v16.8.0/node-v16.8.0-linux-x64.tar.xz...
10:34:15 PM: Computing checksum with sha256sum
10:34:15 PM: Checksums matched!
10:34:18 PM: Now using node v16.8.0 (npm v7.21.0)
10:34:18 PM: Started restoring cached build plugins
10:34:18 PM: Finished restoring cached build plugins
10:34:18 PM: Attempting ruby version 2.7.2, read from environment
10:34:20 PM: Using ruby version 2.7.2
10:34:20 PM: Using PHP version 8.0
10:34:20 PM: Started restoring cached yarn cache
10:34:20 PM: Finished restoring cached yarn cache
10:34:20 PM: Installing yarn at version 1.22.10
10:34:20 PM: Installing Yarn!
10:34:20 PM: > Downloading tarball...
10:34:20 PM: [1/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz --> /tmp/yarn.tar.gz.VSoWGVhkrM
10:34:20 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
10:34:20 PM:                                  Dload  Upload   Total   Spent    Left  Speed
10:34:20 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
10:34:20 PM: 100    81  100    81    0     0    627      0 --:--:-- --:--:-- --:--:--   627
10:34:20 PM: 100    95  100    95    0     0    262      0 --:--:-- --:--:-- --:--:--   262
10:34:20 PM: 100   626  100   626    0     0   1375      0 --:--:-- --:--:-- --:--:--  1375
10:34:21 PM: 100 1215k  100 1215k    0     0  2182k      0 --:--:-- --:--:-- --:--:-- 2182k
10:34:21 PM: [2/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz.asc --> /tmp/yarn.tar.gz.VSoWGVhkrM.asc
10:34:21 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
10:34:21 PM:                                  Dload  Upload   Total   Spent    Left  Speed
10:34:21 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
10:34:21 PM: 100    85  100    85    0     0   1770      0 --:--:-- --:--:-- --:--:--  1770
10:34:21 PM: 100    99  100    99    0     0   1285      0 --:--:-- --:--:-- --:--:--  1285
10:34:21 PM: 100   630  100   630    0     0   6057      0 --:--:-- --:--:-- --:--:--  6057
10:34:21 PM: 100   832  100   832    0     0   7111      0 --:--:-- --:--:-- --:--:--  7111
10:34:21 PM: > Verifying integrity...
10:34:21 PM: gpg: Signature made Fri 02 Oct 2020 11:17:27 AM UTC
10:34:21 PM: gpg:                using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA
10:34:21 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>" [unknown]
10:34:21 PM: gpg: WARNING: This key is not certified with a trusted signature!
10:34:21 PM: gpg:          There is no indication that the signature belongs to the owner.
10:34:21 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
10:34:21 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
10:34:21 PM: > GPG signature looks good
10:34:21 PM: > Extracting to ~/.yarn...
10:34:21 PM: > Adding to $PATH...
10:34:21 PM: > Successfully installed Yarn 1.22.10! Please open another terminal where the `yarn` command will now be available.
10:34:22 PM: No yarn workspaces detected
10:34:22 PM: Started restoring cached node modules
10:34:22 PM: Finished restoring cached node modules
10:34:22 PM: Installing NPM modules using Yarn version 1.22.10
10:34:22 PM: yarn install v1.22.10
10:34:22 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
10:34:22 PM: [1/4] Resolving packages...
10:34:24 PM: warning bootstrap-vue > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
10:34:24 PM: [2/4] Fetching packages...
10:34:55 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
10:34:55 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
10:34:55 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
10:34:55 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
10:34:55 PM: [3/4] Linking dependencies...
10:34:55 PM: warning " > @babel/plugin-proposal-private-methods@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
10:34:56 PM: warning "@babel/plugin-proposal-private-methods > @babel/helper-create-class-features-plugin@7.15.0" has unmet peer dependency "@babel/core@^7.0.0".
10:34:56 PM: warning "@nuxt/content > @nuxt/types > sass-loader@10.1.1" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
10:34:56 PM: warning "@nuxtjs/cloudinary > cloudinary-vue@1.2.3" has unmet peer dependency "vue@^2.0.0".
10:34:56 PM: warning " > @nuxtjs/strapi@0.3.1" has unmet peer dependency "@nuxt/types@*".
10:34:56 PM: warning " > @nuxtjs/strapi@0.3.1" has unmet peer dependency "vuex@*".
10:34:56 PM: warning " > @vue/composition-api@1.1.0" has unmet peer dependency "vue@>= 2.5 < 3".
10:34:56 PM: warning "@vuelidate/core > vue-demi@0.9.1" has unmet peer dependency "vue@^2.6.0 || >=3.0.0-rc.1".
10:34:56 PM: warning "bootstrap-vue > bootstrap@4.6.0" has unmet peer dependency "jquery@1.9.1 - 3".
10:34:56 PM: warning "bootstrap-vue > portal-vue@2.1.7" has unmet peer dependency "vue@^2.5.18".
10:34:56 PM: warning "nuxt > @nuxt/components@2.2.0" has unmet peer dependency "consola@*".
10:34:56 PM: warning " > v-calendar@2.3.2" has unmet peer dependency "vue@^2.5.18".
10:34:56 PM: warning " > vue-currency-input@1.22.6" has unmet peer dependency "vue@^2.5".
10:34:56 PM: warning " > vue-select@3.12.2" has unmet peer dependency "vue@2.x".
10:34:56 PM: warning "@nuxtjs/eslint-config > eslint-plugin-jest > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
10:34:56 PM: warning "@nuxtjs/eslint-module > eslint-webpack-plugin@2.5.4" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
10:34:56 PM: warning "@nuxtjs/fontawesome > @fortawesome/vue-fontawesome@0.1.10" has unmet peer dependency "vue@~2".
10:34:56 PM: warning "@nuxtjs/stylelint-module > stylelint-webpack-plugin@2.2.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
10:34:56 PM: warning " > @vue/test-utils@1.2.2" has unmet peer dependency "vue@2.x".
10:34:56 PM: warning " > @vue/test-utils@1.2.2" has unmet peer dependency "vue-template-compiler@^2.x".
10:34:56 PM: warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7.0.0-0".
10:34:56 PM: warning " > babel-jest@26.6.3" has unmet peer dependency "@babel/core@^7.0.0".
10:34:56 PM: warning "babel-jest > babel-preset-jest@26.6.2" has unmet peer dependency "@babel/core@^7.0.0".
10:34:56 PM: warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax@1.0.1" has unmet peer dependency "@babel/core@^7.0.0".
10:34:56 PM: warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/plugin-syntax-bigint@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
10:34:56 PM: warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/plugin-syntax-import-meta@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0".
10:34:56 PM: warning " > sass-loader@10.2.0" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
10:34:56 PM: warning " > vue-jest@3.0.7" has unmet peer dependency "vue@^2.x".
10:34:56 PM: warning " > vue-jest@3.0.7" has unmet peer dependency "vue-template-compiler@^2.x".
10:35:12 PM: [4/4] Building fresh packages...
10:35:18 PM: success Saved lockfile.
10:35:18 PM: Done in 55.96s.
10:35:18 PM: NPM modules installed using Yarn
10:35:19 PM: Started restoring cached go cache
10:35:19 PM: Finished restoring cached go cache
10:35:19 PM: go version go1.16.5 linux/amd64
10:35:19 PM: go version go1.16.5 linux/amd64
10:35:19 PM: Installing missing commands
10:35:19 PM: Verify run directory
10:35:20 PM: ​
10:35:20 PM: ────────────────────────────────────────────────────────────────
10:35:20 PM:   Netlify Build                                                 
10:35:20 PM: ────────────────────────────────────────────────────────────────
10:35:20 PM: ​
10:35:20 PM: ❯ Version
10:35:20 PM:   @netlify/build 18.7.3
10:35:20 PM: ​
10:35:20 PM: ❯ Flags
10:35:20 PM:   baseRelDir: true
10:35:20 PM:   buildId: 613286c122f9e297f83ace3f
10:35:20 PM:   deployId: 613286c122f9e297f83ace41
10:35:20 PM: ​
10:35:20 PM: ❯ Current directory
10:35:20 PM:   /opt/build/repo
10:35:20 PM: ​
10:35:20 PM: ❯ Config file
10:35:20 PM:   No config file was defined: using default values.
10:35:20 PM: ​
10:35:20 PM: ❯ Context
10:35:20 PM:   production
10:35:20 PM: ​
10:35:20 PM: ────────────────────────────────────────────────────────────────
10:35:20 PM:   1. Build command from Netlify app                             
10:35:20 PM: ────────────────────────────────────────────────────────────────
10:35:20 PM: ​
10:35:20 PM: $ npm run generate
10:35:20 PM: > <my-repo-name>@1.0.0 generate
10:35:20 PM: > nuxt generate
10:35:41 PM: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.Aborted
10:35:41 PM: ​
10:35:41 PM: ────────────────────────────────────────────────────────────────
10:35:41 PM:   "build.command" failed                                        
10:35:41 PM: ────────────────────────────────────────────────────────────────
10:35:41 PM: ​
10:35:41 PM:   Error message
10:35:41 PM:   Command failed with exit code 134: npm run generate
10:35:41 PM: ​
10:35:41 PM:   Error location
10:35:41 PM:   In Build command from Netlify app:
10:35:41 PM:   npm run generate
10:35:41 PM: ​
10:35:41 PM:   Resolved config
10:35:41 PM:   build:
10:35:41 PM:     command: npm run generate
10:35:41 PM:     commandOrigin: ui
10:35:41 PM:     publish: /opt/build/repo/dist
10:35:41 PM:     publishOrigin: ui
10:35:42 PM: Caching artifacts
10:35:42 PM: Started saving node modules
10:35:42 PM: Finished saving node modules
10:35:42 PM: Started saving build plugins
10:35:42 PM: Finished saving build plugins
10:35:42 PM: Started saving yarn cache
10:35:49 PM: Finished saving yarn cache
10:35:49 PM: Started saving pip cache
10:35:49 PM: Finished saving pip cache
10:35:49 PM: Started saving emacs cask dependencies
10:35:49 PM: Finished saving emacs cask dependencies
10:35:49 PM: Started saving maven dependencies
10:35:49 PM: Finished saving maven dependencies
10:35:49 PM: Started saving boot dependencies
10:35:49 PM: Finished saving boot dependencies
10:35:49 PM: Started saving rust rustup cache
10:35:49 PM: Finished saving rust rustup cache
10:35:49 PM: Started saving go dependencies
10:35:49 PM: Finished saving go dependencies
10:35:51 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:35:51 PM: Creating deploy upload records
10:35:51 PM: Failing build: Failed to build site
10:35:51 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
10:35:52 PM: Finished processing build request in 1m40.509489893s\


I’ve seen two topics on this, but they didn’t help in my case.

Hi there, glad you found us :wave:

A good starting point for debugging is reading through this Support Guide and following the applicable steps outlined:

If that guide does not help and should need a little more information on the issues you are facing, we will need some further details on your site,

Please share:

  • the name of your build instance: β€œexample-jones.netlify.com”
  • specific debugging steps you have taken
  • any error messages you have received in your terminal window or in the developer console
  • your public repo

Thanks!

@Jorge was running into the same problem yesterday and today. I have attached what my build logs looked like.

5:50:22 AM: Build ready to start
5:50:24 AM: build-image version: 081db65c3e4ce8423fedb40e7689a87de6f84667
5:50:24 AM: build-image tag: v4.3.1
5:50:24 AM: buildbot version: 97a6b2cacb208d0706f4c310f966af375d45e5e6
5:50:24 AM: Fetching cached dependencies
5:50:24 AM: Starting to download cache of 115.2MB
5:50:25 AM: Finished downloading cache in 1.208246737s
5:50:25 AM: Starting to extract cache
5:50:30 AM: Finished extracting cache in 4.138953598s
5:50:30 AM: Finished fetching cache in 5.374287789s
5:50:30 AM: Starting to prepare the repo for build
5:50:30 AM: Preparing Git Reference refs/heads/main
5:50:32 AM: Parsing package.json dependencies
5:50:32 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'web/dist' versus './web/dist' in the Netlify UI
5:50:32 AM: Starting build script
5:50:32 AM: Installing dependencies
5:50:32 AM: Python version set to 2.7
5:50:33 AM: Started restoring cached node version
5:50:34 AM: Finished restoring cached node version
5:50:35 AM: v16.9.1 is already installed.
5:50:35 AM: Now using node v16.9.1 (npm v7.21.1)
5:50:35 AM: Started restoring cached build plugins
5:50:35 AM: Finished restoring cached build plugins
5:50:35 AM: Attempting ruby version 2.7.2, read from environment
5:50:37 AM: Using ruby version 2.7.2
5:50:37 AM: Using PHP version 8.0
5:50:37 AM: Started restoring cached node modules
5:50:37 AM: Finished restoring cached node modules
5:50:37 AM: Installing NPM modules using NPM version 7.21.1
5:50:39 AM: npm WARN old lockfile
5:50:39 AM: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
5:50:39 AM: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
5:50:39 AM: npm WARN old lockfile
5:50:39 AM: npm WARN old lockfile This is a one-time fix-up, please be patient...
5:50:39 AM: npm WARN old lockfile
5:50:48 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
5:50:49 AM: npm WARN deprecated uuid@3.4.0: 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.
5:50:49 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
5:50:54 AM: added 351 packages, removed 1688 packages, changed 53 packages, and audited 670 packages in 16s
5:50:54 AM: 67 packages are looking for funding
5:50:54 AM:   run `npm fund` for details
5:50:54 AM: found 0 vulnerabilities
5:50:54 AM: NPM modules installed
5:50:54 AM: Started restoring cached go cache
5:50:54 AM: Finished restoring cached go cache
5:50:54 AM: go version go1.16.5 linux/amd64
5:50:54 AM: go version go1.16.5 linux/amd64
5:50:54 AM: Installing missing commands
5:50:54 AM: Verify run directory
5:50:55 AM: ​
5:50:55 AM: ────────────────────────────────────────────────────────────────
5:50:55 AM:   Netlify Build                                                 
5:50:55 AM: ────────────────────────────────────────────────────────────────
5:50:55 AM: ​
5:50:55 AM: ❯ Version
5:50:55 AM:   @netlify/build 18.12.0
5:50:55 AM: ​
5:50:55 AM: ❯ Flags
5:50:55 AM:   baseRelDir: true
5:50:55 AM:   buildId: 614afc5e08db3a0008c6ee52
5:50:55 AM:   deployId: 614afc5e08db3a0008c6ee54
5:50:56 AM: ​
5:50:56 AM: ❯ Current directory
5:50:56 AM:   /opt/build/repo
5:50:56 AM: ​
5:50:56 AM: ❯ Config file
5:50:56 AM:   No config file was defined: using default values.
5:50:56 AM: ​
5:50:56 AM: ❯ Context
5:50:56 AM:   production
5:50:56 AM: ​
5:50:56 AM: ────────────────────────────────────────────────────────────────
5:50:56 AM:   1. Build command from Netlify app                             
5:50:56 AM: ────────────────────────────────────────────────────────────────
5:50:56 AM: ​
5:50:56 AM: $ npm run build-web
5:50:56 AM: > personal-website@1.0.0 build-web
5:50:56 AM: > lerna bootstrap && (cd web && npm run build)
5:50:56 AM: lerna notice cli v4.0.0
5:50:56 AM: lerna info ci enabled
5:50:57 AM: lerna info Bootstrapping 2 packages
5:50:57 AM: lerna info Installing external dependencies
5:52:37 AM: lerna info Symlinking packages and binaries
5:52:37 AM: lerna success Bootstrapped 2 packages
5:52:38 AM: > 2021-personal-site@1.0.0 build
5:52:38 AM: > nuxt build
5:52:56 AM: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.Aborted
5:52:56 AM: ​
5:52:56 AM: ────────────────────────────────────────────────────────────────
5:52:56 AM:   "build.command" failed                                        
5:52:56 AM: ────────────────────────────────────────────────────────────────
5:52:56 AM: ​
5:52:56 AM:   Error message
5:52:56 AM:   Command failed with exit code 134: npm run build-web
5:52:56 AM: ​
5:52:56 AM:   Error location
5:52:56 AM:   In Build command from Netlify app:
5:52:56 AM:   npm run build-web
5:52:56 AM: ​
5:52:56 AM:   Resolved config
5:52:56 AM:   build:
5:52:56 AM:     command: npm run build-web
5:52:56 AM:     commandOrigin: ui
5:52:56 AM:     publish: /opt/build/repo/web/dist
5:52:56 AM:     publishOrigin: ui
5:52:56 AM:   functionsDirectory: /opt/build/repo/functions
5:52:57 AM: Caching artifacts
5:52:57 AM: Started saving node modules
5:52:57 AM: Finished saving node modules
5:52:57 AM: Started saving build plugins
5:52:57 AM: Finished saving build plugins
5:52:57 AM: Started saving pip cache
5:52:57 AM: Finished saving pip cache
5:52:57 AM: Started saving emacs cask dependencies
5:52:57 AM: Finished saving emacs cask dependencies
5:52:57 AM: Started saving maven dependencies
5:52:57 AM: Finished saving maven dependencies
5:52:57 AM: Started saving boot dependencies
5:52:57 AM: Finished saving boot dependencies
5:52:57 AM: Started saving rust rustup cache
5:52:57 AM: Finished saving rust rustup cache
5:52:57 AM: Started saving go dependencies
5:52:57 AM: Finished saving go dependencies
5:52:57 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:52:57 AM: Creating deploy upload records
5:52:57 AM: Failing build: Failed to build site
5:52:57 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
5:52:57 AM: Finished processing build request in 2m33.11281281s

steps to debug:
I added a toml file with the following settings:

[build]
  publish = "dist"
[build.environment]
  NODE_VERSION="14.0.0"

I added the following to my environment variables:
Screenshot of Environment Variables

NODE_VERSION="14.0.0"
NETLIFY_BUILD_DEBUG=true

From there I double-checked to make sure that I was using npm run generate and not npm run build. I noticed you are running yarn so the replacement for those commands would be yarn generate and yarn build I would also check to see if you have a package-lock.json and a yarn.lock its usually good practice to have one or the other and not both.
Once I verified those steps I was able to get a successful build. Please keep in mind you don’t need to keep NETLIFY_BUILD_DEBUG once you get things working you can delete the environment variable altogether or remove the value of true and you won’t see all of the verbose messaging.
For more context see the following article.
[Support Guide] Debugging Netlify site builds

1 Like

Hey there, @alotoftype :wave:

Welcome to the Netlify Forums! Thank you so much for sharing such a detailed write up here about your debugging process. This will definitely be helpful for future members who encounter something similar :netliconfetti:

1 Like