TypeError: Cannot read properties of undefined

Hello Support Team,

Site: https://e7catalyst.netlify.app/

build went smoothly without any error, but when using Select field on a main page getting following error:

index-8bfc6cec.js:1 TypeError: Cannot read properties of undefined (reading β€˜selectedHero’)
at m (index-8bfc6cec.js:1178:10489)
at Ve.onUpdate:value.y..y. (index-8bfc6cec.js:1178:11207)
at Ot (index-8bfc6cec.js:20:33733)
at index-8bfc6cec.js:20:33709
at Array.forEach ()
at Ot (index-8bfc6cec.js:20:33698)
at de (index-8bfc6cec.js:1007:3511)
at pe (index-8bfc6cec.js:1007:5703)
at q (index-8bfc6cec.js:1007:5152)
at _ (index-8bfc6cec.js:404:1883)

dev build works ok, npm run build locally went ok, other selects works ok.

Hello @Amesty :wave:t6: welcome to the Netlify forums! :netliconfetti:

Thanks so much for reaching. First, have you looked through this resource 7? It is a compilation of all of our build and deploy resources. This will be a good starting point.

If those resources don’t get you on the right track, can you share a bit more information about what you are trying to accomplish?

Lastly, please share these additional details so we can look into your experience further:

  • your project repo
  • a full copy of your latest deploy log
  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console

Thanks so much!

Thank you for you fast response.

Here is link to github repo of the project - https://github.com/amesty635/e7catalyst

Log:


Deploy log
Preview



5:08:01 PM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
5:08:01 PM: build-image tag: v4.16.1
5:08:01 PM: buildbot version: 943523f0ef337f60b6f95537c422db7cdf8c07c1
5:08:01 PM: Fetching cached dependencies
5:08:01 PM: Failed to fetch cache, continuing with build
5:08:01 PM: Starting to prepare the repo for build
5:08:01 PM: No cached dependencies found. Cloning fresh repo
5:08:01 PM: git clone --filter=blob:none https://github.com/amesty635/e7catalyst
5:08:02 PM: Preparing Git Reference refs/heads/master
5:08:02 PM: Parsing package.json dependencies
5:08:03 PM: Starting build script
5:08:03 PM: Installing dependencies
5:08:03 PM: Python version set to 2.7
5:08:04 PM: v16.19.0 is already installed.
5:08:04 PM: Now using node v16.19.0 (npm v8.19.3)
5:08:04 PM: Enabling node corepack
5:08:04 PM: Started restoring cached build plugins
5:08:04 PM: Finished restoring cached build plugins
5:08:04 PM: Attempting ruby version 2.7.2, read from environment
5:08:05 PM: Using ruby version 2.7.2
5:08:05 PM: Using PHP version 8.0
5:08:05 PM: No npm workspaces detected
5:08:05 PM: Started restoring cached node modules
5:08:05 PM: Finished restoring cached node modules
5:08:05 PM: Installing NPM modules using NPM version 8.19.3
5:08:07 PM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
5:08:13 PM: added 166 packages, and audited 167 packages in 7s
5:08:13 PM: 43 packages are looking for funding
5:08:13 PM:   run `npm fund` for details
5:08:13 PM: found 0 vulnerabilities
5:08:13 PM: NPM modules installed
5:08:13 PM: Creating package sha
5:08:13 PM: Started restoring cached go cache
5:08:13 PM: Finished restoring cached go cache
5:08:14 PM: go version go1.19.4 linux/amd64
5:08:14 PM: Detected 1 framework(s)
5:08:14 PM: "vite" at version "4.0.1"
5:08:14 PM: Installing missing commands
5:08:14 PM: Verify run directory
5:08:14 PM: Section completed: initializing
5:08:15 PM: ​
5:08:15 PM:   Netlify Build                                                 
5:08:15 PM: ────────────────────────────────────────────────────────────────
5:08:15 PM: ​
5:08:15 PM: ❯ Version
5:08:15 PM:   @netlify/build 29.2.1
5:08:15 PM: ​
5:08:15 PM: ❯ Flags
5:08:15 PM:   baseRelDir: true
5:08:15 PM:   buildId: 63aafc3cbe6edb12ec179975
5:08:15 PM:   deployId: 63aafc3cbe6edb12ec179977
5:08:15 PM: ​
5:08:15 PM: ❯ Current directory
5:08:15 PM:   /opt/build/repo
5:08:15 PM: ​
5:08:15 PM: ❯ Config file
5:08:15 PM:   No config file was defined: using default values.
5:08:15 PM: ​
5:08:15 PM: ❯ Context
5:08:15 PM:   production
5:08:15 PM: ​
5:08:15 PM:   1. Build command from Netlify app                             
5:08:15 PM: ────────────────────────────────────────────────────────────────
5:08:15 PM: ​
5:08:15 PM: $ npm run build
5:08:16 PM: > e7catalyst@0.0.0 build
5:08:16 PM: > vite build
5:08:16 PM: vite v4.0.1 building for production...
5:08:16 PM: transforming...
5:08:21 PM: βœ“ 2416 modules transformed.
5:08:22 PM: rendering chunks...
5:08:22 PM: computing gzip size...
5:08:22 PM: dist/index.html                   0.45 kB
5:08:22 PM: dist/assets/index-1c235279.css    3.74 kB β”‚ gzip:   1.10 kB
5:08:22 PM: dist/assets/index-8bfc6cec.js   471.69 kB β”‚ gzip: 143.43 kB
5:08:22 PM: ​
5:08:22 PM: Starting post processing
5:08:22 PM: (build.command completed in 6.2s)
5:08:22 PM: ​
5:08:22 PM: Post processing - HTML
5:08:22 PM:   2. Deploy site                                                
5:08:22 PM: ────────────────────────────────────────────────────────────────
5:08:22 PM: ​
5:08:22 PM: Post processing - header rules
5:08:22 PM: Starting to deploy site from 'dist'
5:08:22 PM: Creating deploy tree 
5:08:22 PM: 0 new files to upload
5:08:22 PM: Post processing - redirect rules
5:08:22 PM: 0 new functions to upload
5:08:22 PM: Section completed: deploying
5:08:22 PM: Site deploy was successfully initiated
5:08:22 PM: Post processing done
5:08:22 PM: ​
5:08:22 PM: (Deploy site completed in 60ms)
5:08:22 PM: Section completed: postprocessing
5:08:22 PM: ​
5:08:22 PM:   Netlify Build Complete                                        
5:08:22 PM: ────────────────────────────────────────────────────────────────
5:08:22 PM: ​
5:08:22 PM: (Netlify Build completed in 6.3s)
5:08:22 PM: Caching artifacts
5:08:22 PM: Started saving node modules
5:08:22 PM: Finished saving node modules
5:08:22 PM: Started saving build plugins
5:08:22 PM: Finished saving build plugins
5:08:22 PM: Started saving pip cache
5:08:22 PM: Finished saving pip cache
5:08:22 PM: Started saving emacs cask dependencies
5:08:22 PM: Finished saving emacs cask dependencies
5:08:22 PM: Started saving maven dependencies
5:08:22 PM: Finished saving maven dependencies
5:08:22 PM: Started saving boot dependencies
5:08:22 PM: Finished saving boot dependencies
5:08:22 PM: Started saving rust rustup cache
5:08:22 PM: Finished saving rust rustup cache
5:08:22 PM: Started saving go dependencies
5:08:22 PM: Finished saving go dependencies
5:08:23 PM: Build script success
5:08:23 PM: Section completed: building
5:08:23 PM: Uploading Cache of size 79.3MB
5:08:24 PM: Section completed: cleanup
5:08:24 PM: Finished processing build request in 22.972075649s
5:08:25 PM: Site is live ✨

the only one error I am getting was in my initial message.
Short description of expected behaviour - when item in select is selected it updates the state and reactively update 3 other selects. selectedHero is declared in Filter.vue as const selectedHero = ref(null). We use this value to look into heroe.js store to filter it and get zodiac id for further filtering.

I’ve submitted a PR: