Error when deploying gridsome project: TypeError: Cannot read property 'install' of undefined

Having trouble figuring out why I can’t deploy my gridsome project.

Here are the deploy logs:

8:02:00 PM: Build ready to start
8:02:07 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
8:02:07 PM: build-image tag: v3.3.20
8:02:07 PM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
8:02:07 PM: Fetching cached dependencies
8:02:07 PM: Failed to fetch cache, continuing with build
8:02:07 PM: Starting to prepare the repo for build
8:02:08 PM: No cached dependencies found. Cloning fresh repo
8:02:08 PM: git clone https://github.com/treyg/tag-web-dev
8:02:09 PM: Preparing Git Reference refs/heads/master
8:02:10 PM: Starting build script
8:02:10 PM: Installing dependencies
8:02:10 PM: Python version set to 2.7
8:02:12 PM: v12.18.0 is already installed.
8:02:12 PM: Now using node v12.18.0 (npm v6.14.4)
8:02:12 PM: Started restoring cached build plugins
8:02:12 PM: Finished restoring cached build plugins
8:02:12 PM: Attempting ruby version 2.7.1, read from environment
8:02:13 PM: Using ruby version 2.7.1
8:02:14 PM: Using PHP version 5.6
8:02:14 PM: 5.2 is already installed.
8:02:14 PM: Using Swift version 5.2
8:02:14 PM: Started restoring cached node modules
8:02:14 PM: Finished restoring cached node modules
8:02:14 PM: Started restoring cached yarn cache
8:02:14 PM: Finished restoring cached yarn cache
8:02:14 PM: Installing yarn at version 1.22.4
8:02:14 PM: Installing Yarn!
8:02:14 PM: > Downloading tarball...
8:02:14 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.5LbKUGl4il
8:02:14 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
8:02:14 PM:                                  Dload  Upload   Total   Spent    Left  Speed
8:02:14 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
8:02:14 PM: 100    80  100    80    0     0    281      0 --:--:-- --:--:-- --:--:--   282
8:02:14 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
8:02:14 PM: 100    93  100    93    0     0    156      0 --:--:-- --:--:-- --:--:--   420
8:02:15 PM: 100   630  100   630    0     0    730      0 --:--:-- --:--:-- --:--:--   730
8:02:15 PM: 100 1215k  100 1215k    0     0   948k      0  0:00:01  0:00:01 --:--:--  948k
8:02:15 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.5LbKUGl4il.asc
8:02:15 PM: 100    84  100    84    0     0   2842      0 --:--:-- --:--:-- --:--:--  2842
8:02:15 PM: 100    97  100    97    0     0   1530      0 --:--:-- --:--:-- --:--:--  1530
8:02:15 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
8:02:15 PM: 100   634  100   634    0     0   3161      0 --:--:-- --:--:-- --:--:--  619k
8:02:15 PM: 100  1028  100  1028    0     0   4248      0 --:--:-- --:--:-- --:--:--  4248
8:02:15 PM: > Verifying integrity...
8:02:15 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
8:02:15 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
8:02:15 PM: gpg: WARNING: This key is not certified with a trusted signature!
8:02:15 PM: gpg:          There is no indication that the signature belongs to the owner.
8:02:15 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
8:02:15 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
8:02:15 PM: > GPG signature looks good
8:02:15 PM: > Extracting to ~/.yarn...
8:02:15 PM: > Adding to $PATH...
8:02:16 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
8:02:16 PM: Installing NPM modules using Yarn version 1.22.4
8:02:17 PM: yarn install v1.22.4
8:02:17 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.
8:02:17 PM: [1/4] Resolving packages...
8:02:19 PM: [2/4] Fetching packages...
8:02:24 PM: warning mini-css-extract-plugin@0.5.0: Invalid bin field for "mini-css-extract-plugin".
8:02:24 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".
8:02:34 PM: info fsevents@1.2.9: The platform "linux" is incompatible with this module.
8:02:34 PM: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
8:02:34 PM: [3/4] Linking dependencies...
8:02:34 PM: warning " > bootstrap@4.3.1" has unmet peer dependency "jquery@1.9.1 - 3".
8:02:34 PM: warning " > bootstrap@4.3.1" has unmet peer dependency "popper.js@^1.14.7".
8:02:34 PM: warning "bootstrap-vue > portal-vue@2.1.6" has unmet peer dependency "vue@^2.5.18".
8:02:34 PM: warning " > sass-loader@7.3.1" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
8:02:39 PM: [4/4] Building fresh packages...
8:02:42 PM: success Saved lockfile.
8:02:42 PM: Done in 25.87s.
8:02:42 PM: NPM modules installed using Yarn
8:02:43 PM: Started restoring cached go cache
8:02:43 PM: Finished restoring cached go cache
8:02:43 PM: go version go1.14.4 linux/amd64
8:02:43 PM: go version go1.14.4 linux/amd64
8:02:43 PM: Installing missing commands
8:02:43 PM: Verify run directory
8:02:44 PM: ​
8:02:44 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
8:02:44 PM: β”‚        Netlify Build        β”‚
8:02:44 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
8:02:44 PM: ​
8:02:44 PM: ❯ Version
8:02:44 PM:   @netlify/build 2.0.27
8:02:44 PM: ​
8:02:44 PM: ❯ Flags
8:02:44 PM:   deployId: 5f090178cc69580007e628de
8:02:44 PM:   mode: buildbot
8:02:44 PM: ​
8:02:44 PM: ❯ Current directory
8:02:44 PM:   /opt/build/repo
8:02:44 PM: ​
8:02:44 PM: ❯ Config file
8:02:44 PM:   No config file was defined: using default values.
8:02:44 PM: ​
8:02:44 PM: ❯ Context
8:02:44 PM:   production
8:02:44 PM: ​
8:02:44 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
8:02:44 PM: β”‚ 1. Build command from Netlify app β”‚
8:02:44 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
8:02:44 PM: ​
8:02:44 PM: $ gridsome build
8:02:45 PM: Gridsome v0.7.9
8:02:45 PM: Initializing plugins...
8:02:45 PM: Load sources - 0.04s
8:02:45 PM: Create GraphQL schema - 0.05s
8:02:45 PM: Create pages and templates - 0.05s
8:02:46 PM: Generate temporary code - 0.03s
8:02:46 PM: Bootstrap finish - 0.96s
8:02:46 PM: Compiling assets...
8:02:46 PM: Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
8:03:08 PM: Compile assets - 22.92s
8:03:09 PM: Execute GraphQL (10 queries) - 0.36s
8:03:09 PM: Write out page data (10 files) - 0s
8:03:09 PM: Could not generate HTML for "/blog/sagan-ipsum/":
8:03:09 PM: TypeError: Cannot read property 'install' of undefined
8:03:09 PM:     at Function.t.use (/opt/build/repo/node_modules/vue/dist/vue.runtime.common.prod.js:6:36869)
8:03:09 PM:     at src_main (src/main.js:19:6)
8:03:09 PM:     at runMain (node_modules/gridsome/app/app.js:54:4)
8:03:09 PM:     at Module.<anonymous> (node_modules/gridsome/app/entry.server.js:3:0)
8:03:09 PM:     at __webpack_require__ (webpack/bootstrap:25:0)
8:03:09 PM:     at Object.<anonymous> (assets/js/app.97edcbf3.js:2854:18)
8:03:09 PM:     at __webpack_require__ (webpack/bootstrap:25:0)
8:03:09 PM:     at assets/js/app.97edcbf3.js:118:18
8:03:09 PM:     at Object.<anonymous> (assets/js/app.97edcbf3.js:121:10)
8:03:09 PM:     at o (/opt/build/repo/node_modules/vue-server-renderer/build.prod.js:1:77543)
8:03:10 PM: ​
8:03:10 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
8:03:10 PM: β”‚   "build.command" failed    β”‚
8:03:10 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
8:03:10 PM: ​
8:03:10 PM:   Error message
8:03:10 PM:   Command failed with exit code 1: gridsome build
8:03:10 PM: ​
8:03:10 PM:   Error location
8:03:10 PM:   In Build command from Netlify app:
8:03:10 PM:   gridsome build
8:03:10 PM: ​
8:03:10 PM:   Resolved config
8:03:10 PM:   build:
8:03:10 PM:     command: gridsome build
8:03:10 PM:     commandOrigin: ui
8:03:10 PM:     publish: /opt/build/repo/dist
8:03:10 PM: Caching artifacts
8:03:10 PM: Started saving node modules
8:03:10 PM: Finished saving node modules
8:03:10 PM: Started saving build plugins
8:03:10 PM: Finished saving build plugins
8:03:10 PM: Started saving yarn cache
8:03:10 PM: Finished saving yarn cache
8:03:10 PM: Started saving pip cache
8:03:10 PM: Finished saving pip cache
8:03:10 PM: Started saving emacs cask dependencies
8:03:10 PM: Finished saving emacs cask dependencies
8:03:10 PM: Started saving maven dependencies
8:03:10 PM: Finished saving maven dependencies
8:03:10 PM: Started saving boot dependencies
8:03:10 PM: Finished saving boot dependencies
8:03:10 PM: Started saving go dependencies
8:03:10 PM: Finished saving go dependencies
8:03:13 PM: Error running command: Build script returned non-zero exit code: 1
8:03:13 PM: Failing build: Failed to build site
8:03:13 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
8:03:13 PM: Finished processing build request in 1m5.524488833s

Any help would be greatly appreciated. Thanks!

hi there, a quick google shows this seems to be a common problem.

was this working locally?

Hey Perry, yes, it’s working locally.

EDIT: Figured it out. It was an error with how I was importing BootstrapVue icons globally.

1 Like

thanks for posting your solution!