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.

Console errors on page load

See original GitHub issue

When I include the component this way into a component of my app:

<template>
  <div>some long content</div>
  <Waypoint @change="onRead" :active="notYetRead"></Waypoint>
</template>
// This is composition API inside <script setup>

import { Waypoint } from "vue-waypoint"

const notYetRead = ref(true)
const onRead = (waypointState: "IN" | "OUT") => {
  if (waypointState === "IN") {
    console.log("seen")
    notYetRead.value = false
  }
}

The event never fires, and when the page loads I get several warnings by Vue:

[Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. runtime-core.esm-bundler.js:6584
[Vue warn]: onBeforeUpdate is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. runtime-core.esm-bundler.js:6584
[Vue warn]: onUpdated is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. runtime-core.esm-bundler.js:6584
[Vue warn]: onBeforeUnmount is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. runtime-core.esm-bundler.js:6584
[Vue warn]: Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.

My component loads and works fine if I remove Waypoint.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rmrf1039commented, Apr 13, 2022

I have solved the problem. Just upgrade your Vue3 version to 3.1.1. I was using 3.0.11, having the same warnings too.

0reactions
u373693041commented, Jun 7, 2022

has the same question with “vue”: “^3.2.36”,“vue-waypoint”: “^4.2.1”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix JavaScript errors that are reported in the Console
Demo page: JavaScript error reported in the Console tool ... Right-click anywhere in the webpage and then select Inspect. Or, press F12 ....
Read more >
How to print all the console errors to an html file as soon as ...
I want to see all the console error messages in an html file as soon as the page loads, I am new to...
Read more >
Using Your Browser to Diagnose JavaScript Errors
The error may be generated when the page loads. The console will provide you with the error type, the location of the error...
Read more >
Debugging in JavaScript: Reading Console Errors
When I load up this page, fill out the form, and click the submit button, nothing happens. Time to debug! Checking the DevTools...
Read more >
How Do I Diagnose JavaScript Errors on My Site?
This will teach you how to diagnose a JavaScript error through FireFox, Internet Explorer, Chrome, Opera, and safari.
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