Home
Support Forums

TypeError: Cannot read properties of null (reading 'Vue') when using smooth scrolling library

Hello, I am having issues with a TypeError when build my site. This has only started happening recently when using a smooth scrolling library. I am using Vue.js and Gridsome and have not had any issues until now. I initially thought it was an issue with the library I was using but I removed the library and used another one instead but received the same error. Any help would be greatlyt appreciated, thanks!

Site Name:
dylandavenport.com

Deploy Log:
9:11:42 PM: Build ready to start
9:11:43 PM: build-image version: 081db65c3e4ce8423fedb40e7689a87de6f84667
9:11:43 PM: build-image tag: v4.3.1
9:11:43 PM: buildbot version: a7ed393d7802bf453be684c29d76700ec4b7cbba
9:11:43 PM: Fetching cached dependencies
9:11:44 PM: Starting to download cache of 178.1MB
9:11:45 PM: Finished downloading cache in 1.334352977s
9:11:45 PM: Starting to extract cache
9:11:50 PM: Finished extracting cache in 5.60320982s
9:11:51 PM: Finished fetching cache in 7.060919511s
9:11:51 PM: Starting to prepare the repo for build
9:11:51 PM: Preparing Git Reference refs/heads/master
9:11:52 PM: Parsing package.json dependencies
9:11:52 PM: Starting build script
9:11:52 PM: Installing dependencies
9:11:52 PM: Python version set to 2.7
9:11:53 PM: Started restoring cached node version
9:11:55 PM: Finished restoring cached node version
9:11:55 PM: v16.9.1 is already installed.
9:11:55 PM: Now using node v16.9.1 (npm v7.21.1)
9:11:55 PM: Started restoring cached build plugins
9:11:55 PM: Finished restoring cached build plugins
9:11:56 PM: Attempting ruby version 2.7.2, read from environment
9:11:57 PM: Using ruby version 2.7.2
9:11:57 PM: Using PHP version 8.0
9:11:57 PM: Started restoring cached node modules
9:11:57 PM: Finished restoring cached node modules
9:11:57 PM: Installing NPM modules using NPM version 7.21.1
9:12:03 PM: added 3 packages, and audited 1657 packages in 5s
9:12:03 PM: 91 packages are looking for funding
9:12:03 PM: run npm fund for details
9:12:03 PM: 22 vulnerabilities (3 low, 17 moderate, 2 high)
9:12:03 PM: To address issues that do not require attention, run:
9:12:03 PM: npm audit fix
9:12:03 PM: Some issues need review, and may require choosing
9:12:03 PM: a different dependency.
9:12:03 PM: Run npm audit for details.
9:12:03 PM: NPM modules installed
9:12:03 PM: Started restoring cached go cache
9:12:03 PM: Finished restoring cached go cache
9:12:03 PM: go version go1.16.5 linux/amd64
9:12:03 PM: go version go1.16.5 linux/amd64
9:12:03 PM: Installing missing commands
9:12:03 PM: Verify run directory
9:12:04 PM: ​
9:12:04 PM: ────────────────────────────────────────────────────────────────
9:12:04 PM: Netlify Build
9:12:04 PM: ────────────────────────────────────────────────────────────────
9:12:04 PM: ​
9:12:04 PM: ❯ Version
9:12:04 PM: @netlify/build 18.10.0
9:12:04 PM: ​
9:12:04 PM: ❯ Flags
9:12:04 PM: baseRelDir: true
9:12:04 PM: buildId: 6147dfcd3d41af000865ba45
9:12:04 PM: deployId: 6147dfcd3d41af000865ba47
9:12:04 PM: ​
9:12:04 PM: ❯ Current directory
9:12:04 PM: /opt/build/repo
9:12:04 PM: ​
9:12:04 PM: ❯ Config file
9:12:04 PM: No config file was defined: using default values.
9:12:04 PM: ​
9:12:04 PM: ❯ Context
9:12:04 PM: production
9:12:04 PM: ​
9:12:04 PM: ────────────────────────────────────────────────────────────────
9:12:04 PM: 1. Build command from Netlify app
9:12:04 PM: ────────────────────────────────────────────────────────────────
9:12:04 PM: ​
9:12:04 PM: $ gridsome build
9:12:05 PM: Gridsome v0.7.23
9:12:06 PM: Initializing plugins…
9:12:06 PM: Load sources - 0s
9:12:06 PM: Create GraphQL schema - 0.03s
9:12:06 PM: Create pages and templates - 0.03s
9:12:06 PM: Generate temporary code - 0.01s
9:12:06 PM: Bootstrap finish - 0.73s
9:12:06 PM: Compiling assets…
9:12:19 PM: Compile assets - 12.93s
9:12:19 PM: Execute GraphQL (2 queries) - 0s
9:12:19 PM: Could not generate HTML for “/404/”:
9:12:19 PM: TypeError: Cannot read properties of null (reading ‘Vue’)
9:12:19 PM: at assets/js/app.9593bd94.js:1969:47
9:12:19 PM: at assets/js/app.9593bd94.js:1435:28
9:12:19 PM: at Object.8Tyq (node_modules/vue-scrollto/vue-scrollto.js:10:1)
9:12:19 PM: at webpack_require (webpack/bootstrap:25:0)
9:12:19 PM: at Module.O/VM (assets/js/app.9593bd94.js:5073:20)
9:12:19 PM: at webpack_require (webpack/bootstrap:25:0)
9:12:19 PM: at Object.0 (assets/js/app.9593bd94.js:277:18)
9:12:19 PM: at webpack_require (webpack/bootstrap:25:0)
9:12:19 PM: at assets/js/app.9593bd94.js:118:18
9:12:19 PM: at Object. (assets/js/app.9593bd94.js:121:10)
9:12:19 PM: ​
9:12:19 PM: ────────────────────────────────────────────────────────────────
9:12:19 PM: “build.command” failed
9:12:19 PM: ────────────────────────────────────────────────────────────────
9:12:19 PM: ​
9:12:19 PM: Error message
9:12:19 PM: Command failed with exit code 1: gridsome build
9:12:19 PM: ​
9:12:19 PM: Error location
9:12:19 PM: In Build command from Netlify app:
9:12:19 PM: gridsome build
9:12:19 PM: ​
9:12:19 PM: Resolved config
9:12:19 PM: build:
9:12:19 PM: command: gridsome build
9:12:19 PM: commandOrigin: ui
9:12:19 PM: publish: /opt/build/repo/dist
9:12:19 PM: publishOrigin: ui
9:12:20 PM: Caching artifacts
9:12:20 PM: Started saving node modules
9:12:20 PM: Finished saving node modules
9:12:20 PM: Started saving build plugins
9:12:20 PM: Finished saving build plugins
9:12:20 PM: Started saving pip cache
9:12:20 PM: Finished saving pip cache
9:12:20 PM: Started saving emacs cask dependencies
9:12:20 PM: Finished saving emacs cask dependencies
9:12:20 PM: Started saving maven dependencies
9:12:20 PM: Finished saving maven dependencies
9:12:20 PM: Started saving boot dependencies
9:12:20 PM: Finished saving boot dependencies
9:12:20 PM: Started saving rust rustup cache
9:12:20 PM: Finished saving rust rustup cache
9:12:20 PM: Started saving go dependencies
9:12:20 PM: Finished saving go dependencies
9:12:20 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:12:20 PM: Creating deploy upload records
9:12:20 PM: Failing build: Failed to build site
9:12:20 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
9:12:20 PM: Finished processing build request in 36.843785893s

Hi @DRD161,

I can see that you’ve had a successful build lately. Have you managed to fix this?

Hi @hrishikesh I somewhat resolved the issue. It was being caused by a parallax plugin that I was using in Gridsome. I am currently working on a fix on my end but once I removed that plugin my builds started working again.