Topic: Can't import Notify (throws a plugin installation error)

Rustam Salakhutdinov free asked 4 years ago


I want to use Notifies (https://mdbootstrap.com/docs/vue/advanced/notifications/#docsTabsAPI).

I try to import it like in the example:

import Vue from 'vue';    
import 'bootstrap-css-only/css/bootstrap.min.css';
import 'mdbvue/build/css/mdb.css';
import App from './App.vue'
import Notify from 'mdbvue';

Vue.use(Notify);

But I have an exception:

Uncaught TypeError: Cannot read property 'install' of undefined
at Function.Vue.use (vue.runtime.esm.js?2b0e:5106)
at eval (main.js?56d7:12)
at Module../src/main.js (app.js:1348)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at Object.1 (app.js:1433)
at __webpack_require__ (app.js:854)
at checkDeferredModules (app.js:46)
at app.js:994
at app.js:997

Other PRO components work right


Mikołaj Smoleński staff commented 4 years ago

Please use the following code and let me know if it helped:

import Notify from 'mdbvue/lib/components/Notify'
Vue.use(Notify)

Best regards


Rustam Salakhutdinov free commented 4 years ago

Thanks, it works now!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: PC
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes