Trouble deploying / building Vuepress Site

Hey there, it’d be great to get some help with this vuepress build I am attempting. The local dev environment is working fine. Just deploying with netlify is having some issues.

I’ve deployed in the past with no problems. More recently I’m experiencing some errors. Not sure what I’ve done to stop it working.

1:41:12 PM: build-image version: a2d22d22e4555d1ef0a972ed14a0a4b366ad20c4 (focal)
1:41:12 PM: build-image tag: v4.16.3
1:41:12 PM: buildbot version: 211709fe0bb687fe4fe2ebbb0a0d7258aa6e265c
1:41:12 PM: Fetching cached dependencies
1:41:12 PM: Failed to fetch cache, continuing with build
1:41:12 PM: Starting to prepare the repo for build
1:41:13 PM: No cached dependencies found. Cloning fresh repo
1:41:13 PM: git clone --filter=blob:none --no-checkout https://github.com/connorforsythco/Vuepress2
1:41:13 PM: Preparing Git Reference refs/heads/master
1:41:13 PM: Parsing package.json dependencies
1:41:15 PM: Starting build script
1:41:15 PM: Installing dependencies
1:41:15 PM: Python version set to 2.7
1:41:15 PM: v16.19.0 is already installed.
1:41:15 PM: Now using node v16.19.0 (npm v8.19.3)
1:41:15 PM: Enabling Node.js Corepack
1:41:16 PM: Started restoring cached build plugins
1:41:16 PM: Finished restoring cached build plugins
1:41:16 PM: Attempting Ruby version 2.7.2, read from environment
1:41:16 PM: Using Ruby version 2.7.2
1:41:16 PM: Using PHP version 8.0
1:41:16 PM: Started restoring cached corepack dependencies
1:41:16 PM: mv: cannot move '/opt/build/cache/.node/corepack' to '/opt/buildhome/.node/corepack': No such file or directory
1:41:16 PM: Finished restoring cached corepack dependencies
1:41:16 PM: Started restoring cached yarn cache
1:41:16 PM: Finished restoring cached yarn cache
1:41:17 PM: Installing Yarn version 1.22.10
1:41:17 PM: Preparing yarn@1.22.10 for immediate activation...
1:41:17 PM: No yarn workspaces detected
1:41:17 PM: Started restoring cached node modules
1:41:17 PM: Finished restoring cached node modules
1:41:17 PM: Installing npm packages using Yarn version 1.22.10
1:41:17 PM: yarn install v1.22.10
1:41:18 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.
1:41:18 PM: [1/4] Resolving packages...
1:41:18 PM: [2/4] Fetching packages...
1:41:27 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
1:41:27 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-darwin-arm64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-darwin-arm64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-darwin-arm64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-android-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-android-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info @esbuild/linux-loong64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "@esbuild/linux-loong64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-freebsd-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-freebsd-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-android-arm64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-android-arm64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-android-arm64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-freebsd-arm64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-freebsd-arm64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-freebsd-arm64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info @esbuild/android-arm@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "@esbuild/android-arm@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info @esbuild/android-arm@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-linux-32@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-32@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-riscv64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-riscv64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-darwin-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-darwin-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-mips64le@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-mips64le@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-s390x@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-s390x@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-arm64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-arm64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-netbsd-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-netbsd-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-sunos-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-sunos-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-arm64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-arm64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-arm64@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-windows-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-openbsd-64@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-openbsd-64@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-arm@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-arm@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-32@0.15.18: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-32@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-32@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-linux-ppc64le@0.15.18: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-ppc64le@0.15.18" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-darwin-arm64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-darwin-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-darwin-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info @esbuild/linux-loong64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "@esbuild/linux-loong64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-android-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-android-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-android-arm64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-android-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-android-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-darwin-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-darwin-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-freebsd-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-freebsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-freebsd-arm64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-freebsd-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-freebsd-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-linux-32@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-32@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-arm@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-arm@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-mips64le@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-mips64le@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-ppc64le@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-ppc64le@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-riscv64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-riscv64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-linux-s390x@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info "esbuild-linux-s390x@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-netbsd-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-netbsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-openbsd-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-openbsd-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-sunos-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-sunos-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-32@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-32@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-32@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: info esbuild-windows-64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-arm64@0.14.54: The platform "linux" is incompatible with this module.
1:41:27 PM: info "esbuild-windows-arm64@0.14.54" is an optional dependency and failed compatibility check. Excluding it from installation.
1:41:27 PM: info esbuild-windows-arm64@0.14.54: The CPU architecture "x64" is incompatible with this module.
1:41:27 PM: [3/4] Linking dependencies...
1:41:27 PM: warning " > @chakra-ui/vue@0.12.0" has unmet peer dependency "vue@>=2.6.10".
1:41:27 PM: warning "@chakra-ui/vue > aria-hidden@1.2.2" has unmet peer dependency "react@^16.9.0 || ^17.0.0 || ^18.0.0".
1:41:27 PM: warning "@chakra-ui/vue > breadstick@0.2.15" has unmet peer dependency "vue@^2.6.10".
1:41:27 PM: warning "@chakra-ui/vue > portal-vue@2.1.7" has unmet peer dependency "vue@^2.5.18".
1:41:27 PM: warning "@emotion/css > @emotion/babel-plugin@11.10.5" has unmet peer dependency "@babel/core@^7.0.0".
1:41:27 PM: warning "@emotion/css > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
1:41:27 PM: warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "@vuepress/client@^2.0.0-beta.50".
1:41:27 PM: warning "vuepress > vuepress-vite@2.0.0-beta.51" has unmet peer dependency "vue@^3.2.37".
1:41:29 PM: [4/4] Building fresh packages...
1:41:29 PM: success Saved lockfile.
1:41:29 PM: Done in 11.69s.
1:41:29 PM: npm packages installed using Yarn
1:41:29 PM: Started restoring cached go cache
1:41:29 PM: Finished restoring cached go cache
1:41:29 PM: Installing Go version 1.17 (requested 1.17)
1:41:33 PM: unset GOOS;
1:41:33 PM: unset GOARCH;
1:41:33 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
1:41:33 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
1:41:33 PM: go version >&2;
1:41:33 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
1:41:33 PM: go version go1.17 linux/amd64
1:41:34 PM: Detected 1 framework(s)
1:41:34 PM: "vuepress" at version "2.0.0-beta.51"
1:41:34 PM: Installing missing commands
1:41:34 PM: Verify run directory
1:41:34 PM: Section completed: initializing
1:41:35 PM: ​
1:41:35 PM:   Netlify Build                                                 
1:41:35 PM: ────────────────────────────────────────────────────────────────
1:41:35 PM: ​
1:41:35 PM: ❯ Version
1:41:35 PM:   @netlify/build 29.5.1
1:41:35 PM: ​
1:41:35 PM: ❯ Flags
1:41:35 PM:   baseRelDir: true
1:41:35 PM:   buildId: 63cb50c774077a7c74fc816b
1:41:35 PM:   deployId: 63cb50c774077a7c74fc816d
1:41:35 PM: ​
1:41:35 PM: ❯ Current directory
1:41:35 PM:   /opt/build/repo
1:41:35 PM: ​
1:41:35 PM: ❯ Config file
1:41:35 PM:   No config file was defined: using default values.
1:41:35 PM: ​
1:41:35 PM: ❯ Context
1:41:35 PM:   production
1:41:35 PM: ​
1:41:35 PM: ❯ Installing plugins
1:41:35 PM:    - @netlify/plugin-lighthouse@4.0.5
1:41:46 PM: ​
1:41:46 PM: ❯ Loading plugins
1:41:46 PM:    - @netlify/plugin-lighthouse@4.0.5 from Netlify app
1:41:47 PM: ​
1:41:47 PM:   1. Build command from Netlify app                             
1:41:47 PM: ────────────────────────────────────────────────────────────────
1:41:47 PM: ​
1:41:47 PM: $ yarn docs:build
1:41:47 PM: yarn run v1.22.10
1:41:47 PM: $ vuepress build docs
1:41:48 PM: warning plugin @vuepress/plugin-git has been used multiple times, only the last one will take effect
1:41:48 PM: - Initializing and preparing data
1:41:48 PM: ✔ Initializing and preparing data - done in 193ms
1:41:48 PM: - Compiling with vite
1:41:52 PM: ✔ Compiling with vite - done in 3.38s
1:41:52 PM: - Rendering 8 pages
1:41:52 PM: [Vue warn]: injection "Symbol()" not found.
1:41:52 PM: [Vue warn]: Unhandled error during execution of setup function
1:41:52 PM:   at <SearchBox locales= {} hotKeys= [ 's', '/' ] maxSuggestions=5 >
1:41:52 PM: ✖ Rendering 8 pages - failed in 55ms
1:41:52 PM: Error: useRouteLocale() is called without provider.
1:41:52 PM:     at useRouteLocale$1 (file:///opt/build/repo/docs/.vuepress/.temp/.server/app.81d38d63.mjs:2207:11)
1:41:52 PM:     at setup (file:///opt/build/repo/docs/.vuepress/.temp/.server/app.81d38d63.mjs:2805:25)
1:41:52 PM:     at callWithErrorHandling (/opt/build/repo/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:157:22)
1:41:52 PM:     at setupStatefulComponent (/opt/build/repo/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7176:29)
1:41:52 PM:     at setupComponent (/opt/build/repo/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7131:11)
1:41:52 PM:     at renderComponentVNode (/opt/build/repo/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:169:17)
1:41:52 PM:     at renderVNode (/opt/build/repo/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:296:22)
1:41:52 PM:     at renderComponentSubTree (/opt/build/repo/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:202:9)
1:41:52 PM:     at renderComponentVNode (/opt/build/repo/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:185:16)
1:41:52 PM:     at renderVNode (/opt/build/repo/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:296:22)
1:41:52 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
1:41:52 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1:41:52 PM: ​
1:41:52 PM:   "build.command" failed                                        
1:41:52 PM: ────────────────────────────────────────────────────────────────
1:41:52 PM: ​
1:41:52 PM:   Error message
1:41:52 PM:   Command failed with exit code 1: yarn docs:build (https://ntl.fyi/exit-code-1)
1:41:52 PM: ​
1:41:52 PM:   Error location
1:41:52 PM:   In Build command from Netlify app:
1:41:52 PM:   yarn docs:build
1:41:52 PM: ​
1:41:52 PM:   Resolved config
1:41:52 PM:   build:
1:41:52 PM:     command: yarn docs:build
1:41:52 PM:     commandOrigin: ui
1:41:52 PM:     environment:
1:41:52 PM:       - NODE_SESSION
1:41:52 PM:     publish: /opt/build/repo/docs/.vuepress/dist
1:41:52 PM:     publishOrigin: ui
1:41:52 PM:   plugins:
1:41:52 PM:     - inputs: {}
1:41:52 PM:       origin: ui
1:41:52 PM:       package: '@netlify/plugin-lighthouse'
1:41:52 PM: Caching artifacts
1:41:52 PM: Started saving node modules
1:41:52 PM: Finished saving node modules
1:41:52 PM: Started saving build plugins
1:41:52 PM: Finished saving build plugins
1:41:52 PM: Started saving yarn cache
1:41:53 PM: Finished saving yarn cache
1:41:53 PM: Started saving pip cache
1:41:53 PM: Finished saving pip cache
1:41:53 PM: Started saving emacs cask dependencies
1:41:54 PM: Finished saving emacs cask dependencies
1:41:54 PM: Started saving maven dependencies
1:41:54 PM: Finished saving maven dependencies
1:41:54 PM: Started saving boot dependencies
1:41:54 PM: Finished saving boot dependencies
1:41:54 PM: Started saving rust rustup cache
1:41:54 PM: Finished saving rust rustup cache
1:41:54 PM: Started saving go dependencies
1:41:54 PM: Finished saving go dependencies
1:41:54 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:41:54 PM: Failing build: Failed to build site
1:41:54 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
1:41:54 PM: Finished processing build request in 42.139s

Looks like this issue: @vuepress/plugin-search: Uncaught (in promise) Error: useRouteLocale() is called without provider. · Issue #3040 · vuejs/vuepress · GitHub

I eventually fixed this by reinstalling all my dependencies and fixing package.json file to stock vuepress. I may have tried to install something that broke vuepress

yay @connorforsythco :wave:t6: thanks so much for sharing with us your solution. This will help other users who come across this issue in the future.

It worked for me as well. :grin:

awesome glad to hear it!