question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[nitro] [request error] Cannot read properties of undefined (reading 'name')

See original GitHub issue

Version


  • Operating System: Darwin
  • Node Version: v17.5.0
  • Nuxt Version: 3.0.0-27491748.3186841
  • Package Manager: npm@8.4.1
  • Builder: vite
  • User Config: privateRuntimeConfig, modules
  • Runtime Modules: @nuxtjs/supabase@0.1.7
  • Build Modules: -

Reproduction Link

Steps to reproduce

What is Expected?

What is actually happening?

[nitro] [request error] Cannot read properties of undefined (reading 'name')
  at Module.useSupabaseToken (./.nuxt/dist/server/server.mjs:8157:39)  
  at Module.useSupabaseClient (./.nuxt/dist/server/server.mjs:2411:39)  
  at ./.nuxt/dist/server/server.mjs:2365:40  
  at fn (./.nuxt/dist/server/server.mjs:332:27)  
  at Object.callAsync (./node_modules/unctx/dist/index.mjs:41:19)  
  at callWithNuxt (./.nuxt/dist/server/server.mjs:334:23)  
  at applyPlugin (./.nuxt/dist/server/server.mjs:289:29)  
  at Module.applyPlugins (./.nuxt/dist/server/server.mjs:299:11)  
  at async createNuxtAppServer (./.nuxt/dist/server/server.mjs:44:7)  
  at async renderToString (./node_modules/vue-bundle-renderer/dist/index.mjs:247:19)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
miguelramoscommented, Apr 12, 2022

I have the same problem and checked the code and seems that the destructor now is missing a level.

image Screen Shot 2022-04-12 at 01 37 48

And vars are on .env file. Config defined as:

image
1reaction
larbishcommented, Apr 11, 2022

@procrates Here are the options you can override with the publicRuntimeConfig: https://supabase.nuxtjs.org/#options

Concerning SUPABASE_URL and SUPABASE_KEY, you just have to set it in your .env.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined (reading 'content-type ...
The problem only seems to exist when the API is used while SSR. Requesting with postman does not throw any errors. 1
Read more >
Cannot read properties of undefined Nuxt.js - Stack Overflow
But I m getting cannot read properties of undefined while, open is a defined variable.
Read more >
TypeError: Cannot read properties of undefined (reading 'name')
Hello! I am getting this error: TypeError: Cannot read properties of undefined (reading 'name'). at Object.
Read more >
cannot read properties of undefined (reading 'call') vue
The error message suggests you are trying to read something from an array at a specific index that is undefined. The only occurrence...
Read more >
Cannot read properties of undefined' - JavaScript Debugging
How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found