Maronato / vue-toastification

Vue notifications made easy!
https://vue-toastification.maronato.dev
MIT License
3.13k stars 142 forks source link

No matching export in vue.runtime.esm-bundler.js for import "normalizeClass" #295

Open vishvendrasingh opened 2 years ago

vishvendrasingh commented 2 years ago

Getting below in vue3 + vite

Versions:

Error: Build failed with 18 errors: node_modules/vue-toastification/dist/index.mjs:329:9: error: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "normalizeClass" node_modules/vue-toastification/dist/index.mjs:329:44: error: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "normalizeStyle" node_modules/vue-toastification/dist/index.mjs:329:104: error: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "createElementBlock" node_modules/vue-toastification/dist/index.mjs:389:9: error: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "createElementVNode" node_modules/vue-toastification/dist/index.mjs:389:78: error: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "createElementBlock" ... at failureErrorWithLog (D:\www\test-toast\node_modules\esbuild\lib\main.js:1449:15) at D:\www\test-toast\node_modules\esbuild\lib\main.js:1131:28 at runOnEndCallbacks (D:\www\test-toast\node_modules\esbuild\lib\main.js:921:63) at buildResponseToResult (D:\www\test-toast\node_modules\esbuild\lib\main.js:1129:7) at D:\www\test-toast\node_modules\esbuild\lib\main.js:1236:14 at D:\www\test-toast\node_modules\esbuild\lib\main.js:609:9 at handleIncomingPacket (D:\www\test-toast\node_modules\esbuild\lib\main.js:706:9) at Socket.readFromStdout (D:\www\test-toast\node_modules\esbuild\lib\main.js:576:7) at Socket.emit (events.js:400:28) at Socket.emit (domain.js:470:12)

machinaeXphilip commented 2 years ago

maybe related issue with vue3 + vue-cli on upgrade from "vue-toastification": "^2.0.0-rc.1", to "vue-toastification": "^2.0.0-rc.5"?

(going back to -rc.1 fixed it for us).


 ERROR  Failed to compile with 18 errors                         09:36:39

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock2') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock3') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock4') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock5') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock6') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementBlock' (imported as '_createElementBlock7') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementVNode' (imported as '_createElementVNode') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementVNode' (imported as '_createElementVNode2') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementVNode' (imported as '_createElementVNode3') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementVNode' (imported as '_createElementVNode4') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'createElementVNode' (imported as '_createElementVNode5') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeClass' (imported as '_normalizeClass') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeClass' (imported as '_normalizeClass2') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeClass' (imported as '_normalizeClass3') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeClass' (imported as '_normalizeClass4') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeStyle' (imported as '_normalizeStyle') was not found in 'vue'

 error  in ./node_modules/vue-toastification/dist/index.mjs

"export 'normalizeStyle' (imported as '_normalizeStyle2') was not found in 'vue'

downgrading step by step showed the errors starting from -rc.2 upwards

thisVioletHydra commented 2 years ago
C:\www\demo-i18n yarn dev
yarn run v1.22.15
$ vite
Pre-bundling dependencies:
  pinia
  vue
  vue-toastification
(this will be run only when your dependencies or config have changed)
 > node_modules/pinia/dist/pinia.esm-browser.js:6:9: error: No matching export in "node_modules/vue-demi/lib/index.mjs" for import "getCurrentInstance"
    6 │ import { getCurrentInstance, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReacti...
      ╵          ~~~~~~~~~~~~~~~~~~

p,s i update Vue to 3.2.23 and all work

lgcavalheiro commented 1 year ago

Having a similar issue i think:

✘ [ERROR] No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "default"

    node_modules/vue-toastification/dist/esm/index.js:1:7:
      1 │ import Vue from 'vue';
        ╵        ~~~

EDIT:

My bad the problem was me, i was installing vue-toastification with yarn add vue-toastification instead of yarn add vue-toastification@next, please disregard this (leaving it here anyway since others might be making the same mistake as i did)

jet2018 commented 1 year ago
```q
C:\www\demo-i18n yarn dev
yarn run v1.22.15
$ vite
Pre-bundling dependencies:
  pinia
  vue
  vue-toastification
(this will be run only when your dependencies or config have changed)
 > node_modules/pinia/dist/pinia.esm-browser.js:6:9: error: No matching export in "node_modules/vue-demi/lib/index.mjs" for import "getCurrentInstance"
    6 │ import { getCurrentInstance, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReacti...
      ╵          ~~~~~~~~~~~~~~~~~~

p,s i update Vue to 3.2.23 and all work

this actually works for me too