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.

Almost no composition APIs work, undefined imports

See original GitHub issue

When trying this in a project based off of vitesse, I found that I was unable to use almost any composition APIs available. Most of them had an error like watch is not defined, or ref is not defined. After doing some digging, the offending line was found here

image

<script setup lang="ts">
import { useMouse } from '@vueuse/core'

const {xMouse, yMouse} = useMouse()
</script>
<template>
  <div />
</template>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
justintaddeicommented, Jul 8, 2021

Please try in combination with v-wave@beta (npm i v-wave@beta) and let me know if it resolves the issue. I’ve changed how v-wave detects a vue3 environment and it shouldn’t cause this problem anymore.

0reactions
justintaddeicommented, Jul 8, 2021

@antfu were you able to confirm if this resolved the issue? I don’t know for sure if this fixed it. When I tested originally, the problem was rather intermittent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Composition API FAQ - Vue.js
What is Composition API? #. Composition API is a set of APIs that allows us to author Vue components using imported functions instead...
Read more >
Vue 3 Composition API, do you really need it? - This Dot Labs
Start by importing ref function from the @vue/composition-api package. It wraps any value or object, and makes it reactive so that if its...
Read more >
How can I import an other custom component using Vue ...
You can pass an imported custom component via the h function, like an HTML tag. Event handling works the same way as with...
Read more >
Thought on Vue 3 Composition API - `reactive()` considered ...
This works exactly like data in Vue 2. Except we can now add new properties to them as reactivity is implemented with proxies...
Read more >
Vue Composition API: Working with props - YouTube
This is just one part from the Vue Composition API course over on https://codecourse.com/courses/the-vue-3- composition -apiOfficial ...
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