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.

bug: vue v6 with vue 3.1.0 overrides properties and event emitters

See original GitHub issue

Bug Report

Ionic version:

[ ] 4.x [ ] 5.x [ x] 6.x

Current behavior: Using the ion-title component in the v6 vue beta leads to the following console error: “Cannot read property ‘emit’ of undefined”. The component itself gets rendered, and it seems to work - it just throws an error

EDIT: Same error happens to the ion-menu component.

Screenshot 2021-06-30 at 09 46 12

Expected behavior: No error should be thrown

Steps to reproduce:

  • Create a new ionic vue project
  • Upgrade to v6 beta according to upgrade guide
  • Serve project and open app in browser
  • Check console

Related code:

https://github.com/tho-masn/ionic-ion-title-bug

Other information:

Ionic info:

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

       Require stack:
       - /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
       - /usr/local/lib/node_modules/@ionic/cli/lib/index.js
       - /usr/local/lib/node_modules/@ionic/cli/index.js
       - /usr/local/lib/node_modules/@ionic/cli/bin/ionic
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'

       Require stack:
       - /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
       - /usr/local/lib/node_modules/@ionic/cli/lib/index.js
       - /usr/local/lib/node_modules/@ionic/cli/index.js
       - /usr/local/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

   Ionic CLI       : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 6.0.0-beta.0

Capacitor:

   Capacitor CLI      : 3.0.2
   @capacitor/android : not installed
   @capacitor/core    : 3.0.2
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.0

System:

   NodeJS : v14.8.0 (/usr/local/Cellar/node/14.8.0/bin/node)
   npm    : 6.14.7
   OS     : macOS Big Sur

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
elwinvaneedecommented, Aug 7, 2021

@liamdebeasi Fixed it!

Screenshot 2021-08-07 at 14 39 08
2reactions
liamdebeasicommented, Aug 6, 2021

Thanks! Can you give this updated dev build a shot?

npm install @ionic/vue@6.0.0-dev.202108062034.a70597a @ionic/vue-router@6.0.0-dev.202108062034.a70597a
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue 3.1 - Official Migration Build from Vue 2 to 3 - This Dot Labs
The migration build runs in Vue 2 mode by default - most public APIs behave exactly like Vue 2, with only a few...
Read more >
Please, improve the Docs about Slides (Swiper) - Ionic Vue
... message is this: bug: vue v6 with vue 3.1.0 overrides properties and event emitters · Issue #23539 · ionic-team/ionic-framework · GitHub.
Read more >
A Guide to Vue $emit - How to Emit Custom Events in Vue
Many Vue patterns involve passing data from a parent component to ... When we emit an event, we invoke a method with one...
Read more >
Swiper Changelog
Swiper Changelog. 8.4.5 (2022-11-21). Bug Fixes. a11y: fix JS error "swiper.a11y is undefined" (#6226) (02c1502); touch focusableElements jumps element ...
Read more >
Changelog - Cypress Documentation
Component Testing is now generally available for projects using React, Next.js, Angular, and Vue! Component tests allow you to see and test your...
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 Hashnode Post

No results found