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.

TypeError: Cannot read properties of null (reading 'parentNode')

See original GitHub issue

Environment


  • Operating System: Linux
  • Node Version: v14.18.1
  • Nuxt Version: 3.0.0-27389502.88da719
  • Package Manager: yarn@1.22.17
  • Bundler: Vite
  • User Config: ssr
  • Runtime Modules: -
  • Build Modules: -

Reproduction

use this sandbox, Visit ${url}/organization/365824000000000003/template/new click on the “a” link then the “b” link and this error is thrown:

runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core 
  at <Transition name="page" mode="out-in" > 
  at <Dashboard name="dashboard" > 
  at <AsyncComponentWrapper name="dashboard" > 
  at <NuxtLayout name="dashboard" > 
  at <BaseTransition mode="out-in" appear=false persisted=false  ... > 
  at <Transition name="layout" mode="out-in" > 
  at <RouterView > 
  at <NuxtPage> 
  at <App> 
  at <NuxtRoot>
runtime-dom.esm-bundler.js:35 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')
    at parentNode (runtime-dom.esm-bundler.js:35:30)
    at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5109:17)
    at ReactiveEffect.run (reactivity.esm-bundler.js:160:29)
    at updateComponent (runtime-core.esm-bundler.js:4968:26)
    at processComponent (runtime-core.esm-bundler.js:4901:13)
    at patch (runtime-core.esm-bundler.js:4489:21)
    at patchKeyedChildren (runtime-core.esm-bundler.js:5262:17)
    at patchChildren (runtime-core.esm-bundler.js:5205:21)
    at processFragment (runtime-core.esm-bundler.js:4886:17)
    at patch (runtime-core.esm-bundler.js:4482:17)

Describe the bug

hooks page:start and page:finish don’t seem to fire on pages ${url}/organization/* and an error is thrown when using await in the <script setup> and then navigating to a new page.

I don’t know if this is due to the page structure or the the way the pages are set up. It’s taken me all day to get this error to reproduce and the only way I’ve gotten this to throw is with this folder structure and by

  • first visiting a page that doesn’t use await in the <script setup>
  • then visiting a page that does uses await
  • then by using vue-router to navigate to another page

Additional context

No response

Logs

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:16
  • Comments:48 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
danielroecommented, Apr 5, 2022

The original reproduction now longer gives this error, when wrapping <NuxtPage>:

  <template>
+   <div>
      <NuxtPage />
+   </div>
  </template>

See https://codesandbox.io/s/immutable-fast-kv6yh0

5reactions
codingcncommented, Oct 8, 2022

I solved this problem by using <client-only></client-only> on the outer layer of sub components

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript error: Cannot read property 'parentNode' of null
There are two possibilities: editInput is a typo, and the actual id of that element is different (ids are case-sensitive).
Read more >
TypeError: Cannot read property 'parentNode' of Null in JS
The "Cannot read property 'parentNode' of null" error occurs when you access the parentNode property on a null value. To solve the error,...
Read more >
"Cannot read property parentNode" error - Vue Forum
I'm using async on setup and every time I click on other links, it gives this “Cannot read property 'parentNode' of null”. I...
Read more >
Cannot read property parentNode of null — DataTables forums
To summarize it: 1. The problem is with datatables which are hidden in tabs. 2. There is an exception in a code that...
Read more >
Cannot read properties of null (reading 'parentNode') - Laracasts
(in promise) TypeError: Cannot read properties of null (reading 'parentNode') ; from "@/components/Header.vue" ; import Footer from ; "@/components/Footer.vue"; ...
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