Why can’t my Vue App access results from API in json format?
Have a Vue js app connected to API. It will give an error in case of any issues but has now stopped giving results as it can’t access the json results
ERROR
Cannot read properties of undefined (reading ‘facebook’)
TypeError: Cannot read properties of undefined (reading ‘facebook’)
at Proxy.render (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/BudgetResults.vue?vue&type=template&id=6d8f8071:19:628)
at renderComponentRoot (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:976:38)
at ReactiveEffect.componentUpdateFn [as fn] (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4579:46)
at ReactiveEffect.run (webpack-internal:///./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js:240:19)
at instance.update (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4692:16)
at setupRenderEffect (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4702:5)
at mountComponent (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4496:7)
at processComponent (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4462:9)
at patch (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4137:11)
at ReactiveEffect.componentUpdateFn [as fn] (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4661:9)
why the photos are not displaying
Problem Statement:
I have a Vue component that should display random cat images fetched from https://cataas.com/cat. The component structure is straightforward, iterating over an array (catImageUrls) containing image URLs and binding them to elements using Vue’s v-for directive. Despite fetching data successfully from the API, the images are not showing up on the page.