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.

Notify emits error

See original GitHub issue

only in v1.12.4: my code: ` import { Notify, Dialog, date, format } from ‘quasar’

qnotify(msg) { Notify.create({ color: ‘negative’, position: ‘bottom’, message: msg, icon: ‘report_problem’ }); }

qnotify(“some message…”); `

error message: TypeError: Cannot read property ‘add’ of undefined at Object.create (Notify.js?1f39:373) at Object.qnotify (apis.js?024f:18) at Object.xproc (apis.js?024f:68) at _callee2$ (apis.js?024f:132) at tryCatch (runtime.js?ad1f:45) at Generator.invoke [as _invoke] (runtime.js?ad1f:274) at Generator.prototype.<computed> [as next] (runtime.js?ad1f:97) at asyncGeneratorStep (asyncToGenerator.js?7b6b:3) at _next (asyncToGenerator.js?7b6b:25)

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
luckylookecommented, Jul 16, 2020

Ahaa… this is mandatory to make it work:

Vue.use(Quasar, {
  plugins: {
    Notify,
  },
});

Happy coding 👍 🙂

1reaction
rstoenescucommented, Mar 21, 2021

@F145h It’s not nice to cross-post.

However, I’ll write down the same thing here, in the hope that it may help someone else ending up here.


This is because you’re installing Quasar twice. Notice this in the default main.js:

// src/main.js
import Vue from 'vue'
import App from './App.vue'
import './quasar' // <<<<<<<<<<<<<<< THIS

The contents of the /src/quasar.js file is (just an extract of it):

// src/quasar.js
// .....

Vue.use(Quasar, {
  config: {},
  plugins: {
  }
 })

This is the place where you should add the plugins (and whatever else you need). Otherwise just delete src/quasar.js, remove the import statement for it from main.js and write it all in main.js 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Notifications | Error Handling - RxJS Course
Learn Error Handling | Error Notifications | RxJS Course. ... JavaScript Error object, but can be any error value that is emitted by...
Read more >
Socket.io / ARI error: Emit Alert - Stack Overflow
I simply am trying to emit an alert if there is an error to the front end. javascript · jquery · node.js ·...
Read more >
RxJs Error Handling: Complete Practical Guide
This function takes as input argument an Errors Observable, that emits as values the errors of the input Observable.
Read more >
getting error: "Emit errors as JSON" after validation of a field
I have a very simple validation on a field. When I try to submit the page the validation fires and freezes with a...
Read more >
Notification: error event - Web APIs - MDN Web Docs
The error event of the Notification interface fires when something goes wrong with a Notification (in many cases an error preventing the ...
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