pieces icon indicating copy to clipboard operation
pieces copied to clipboard

I can't Import vs-notify in my vue 2+ project

Open kofimokome opened this issue 7 years ago • 7 comments

This error message keeps coming up at line 38 of vs-notify.js: Uncaught ReferenceError: Vue is not defined How can I fix it?

kofimokome avatar Aug 09 '17 21:08 kofimokome

Are you using vue-cli?

NxtChg avatar Aug 09 '17 22:08 NxtChg

yes

kofimokome avatar Aug 09 '17 22:08 kofimokome

This component is for pure browser setup: you load vue.js and you load vs-notify after it.

If you use anything fancy, you need to read how to register Vue components in your environment and modify the code accordingly.

NxtChg avatar Aug 09 '17 22:08 NxtChg

So does it mean that it may not work with vue-cli?

kofimokome avatar Aug 09 '17 22:08 kofimokome

I don't use vue-cli and so I have no idea :)

NxtChg avatar Aug 09 '17 22:08 NxtChg

OK. Thanks

kofimokome avatar Aug 09 '17 22:08 kofimokome

why not publish as an npm package and remove the restriction. add js files manually this days is too much of a hack. Nice notification lib here

joshua1 avatar Aug 21 '17 09:08 joshua1