vant-ui / vant-ui.github.io

Official website of vant.
https://vant.pro
11 stars 4 forks source link

vant 先安装的2.13.2 然后升级4.8.11 报错 不知道怎么修复 vue": "2.6.10", #1

Closed hairuiVR closed 6 months ago

hairuiVR commented 6 months ago

ERROR Failed to compile with 56 errors 10:04:36

error in ./node_modules/vant/es/space/Space.mjs

"export 'Comment' was not found in 'vue'

error in ./node_modules/vant/es/skeleton/Skeleton.mjs

"export 'Fragment' (imported as '_Fragment') was not found in 'vue'

error in ./node_modules/vant/es/space/Space.mjs

"export 'Fragment' was not found in 'vue'

error in ./node_modules/vant/es/popup/Popup.mjs

"export 'Teleport' was not found in 'vue'

error in ./node_modules/vant/es/space/Space.mjs

"export 'Text' was not found in 'vue'

error in ./node_modules/vant/es/tag/Tag.mjs

"export 'Transition' was not found in 'vue'

error in ./node_modules/vant/es/time-picker/TimePicker.mjs

"export 'computed' was not found in 'vue'

error in ./node_modules/vant/es/utils/mount-component.mjs

"export 'createApp' was not found in 'vue'

error in ./node_modules/vant/es/field/Field.mjs

"export 'createTextVNode' (imported as '_createTextVNode') was not found in 'vue'

error in ./node_modules/vant/es/action-bar/ActionBar.mjs

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

error in ./node_modules/vant/es/action-bar/ActionBar.mjs

"export 'defineComponent' was not found in 'vue'

error in ./node_modules/vant/es/toast/function-call.mjs

"export 'getCurrentInstance' was not found in 'vue'

error in ./node_modules/vant/es/lazyload/vue-lazyload/lazy-image.mjs

"export 'h' was not found in 'vue'

error in ./node_modules/vant/es/composables/on-popup-reopen.mjs

"export 'inject' was not found in 'vue'

error in ./node_modules/vant/es/uploader/Uploader.mjs

"export 'mergeProps' (imported as '_mergeProps') was not found in 'vue'

error in ./node_modules/vant/es/lazyload/vue-lazyload/lazy.mjs

"export 'nextTick' was not found in 'vue'

error in ./node_modules/vant/es/text-ellipsis/TextEllipsis.mjs

"export 'onActivated' was not found in 'vue'

error in ./node_modules/vant/es/uploader/Uploader.mjs

"export 'onBeforeUnmount' was not found in 'vue'

error in ./node_modules/vant/es/composables/use-refs.mjs

"export 'onBeforeUpdate' was not found in 'vue'

error in ./node_modules/vant/es/swipe/Swipe.mjs

"export 'onDeactivated' was not found in 'vue'

error in ./node_modules/vant/es/composables/use-height.mjs

"export 'onMounted' was not found in 'vue'

error in ./node_modules/vant/es/watermark/Watermark.mjs

"export 'onUnmounted' was not found in 'vue'

error in ./node_modules/vant/es/list/List.mjs

"export 'onUpdated' was not found in 'vue'

error in ./node_modules/vant/es/tab/Tab.mjs

"export 'provide' was not found in 'vue'

error in ./node_modules/vant/es/locale/index.mjs

"export 'reactive' was not found in 'vue'

error in ./node_modules/vant/es/action-bar/ActionBar.mjs

"export 'ref' was not found in 'vue'

error in ./node_modules/vant/es/image/Image.mjs

"export 'resolveDirective' (imported as '_resolveDirective') was not found in 'vue'

error in ./node_modules/vant/es/utils/dom.mjs

"export 'unref' was not found in 'vue'

error in ./node_modules/vant/es/uploader/Uploader.mjs

"export 'vShow' (imported as '_vShow') was not found in 'vue'

error in ./node_modules/vant/es/composables/use-height.mjs

"export 'watch' was not found in 'vue'

error in ./node_modules/vant/es/watermark/Watermark.mjs

"export 'watchEffect' was not found in 'vue'

error in ./node_modules/vant/es/uploader/Uploader.mjs

"export 'withDirectives' (imported as '_withDirectives') was not found in 'vue'

error in ./node_modules/vant/es/dialog/Dialog.mjs

"export 'withKeys' was not found in 'vue'

error in ./node_modules/vant/es/field/Field.mjs

Can't import the named export 'CUSTOM_FIELD_INJECTION_KEY' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/circle/Circle.mjs

Can't import the named export 'cancelRaf' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/popover/Popover.mjs

Can't import the named export 'createPopper' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tab/Tab.mjs

Can't import the named export 'doubleRaf' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/lazyload/vue-lazyload/lazy.mjs

Can't import the named export 'getScrollParent' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/lazyload/vue-lazyload/lazy.mjs

Can't import the named export 'inBrowser' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tab/Tab.mjs

Can't import the named export 'normalizeClass' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tab/Tab.mjs

Can't import the named export 'normalizeStyle' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/popover/Popover.mjs

Can't import the named export 'offsetModifier' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tabs/Tabs.mjs

Can't import the named export 'onMountedOrActivated' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/rolling-text/RollingText.mjs

Can't import the named export 'raf' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tab/Tab.mjs

Can't import the named export 'stringifyStyle' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/action-bar/ActionBar.mjs

Can't import the named export 'useChildren' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/swipe-cell/SwipeCell.mjs

Can't import the named export 'useClickAway' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/count-down/CountDown.mjs

Can't import the named export 'useCountDown' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/uploader/Uploader.mjs

Can't import the named export 'useCustomFieldValue' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tabs/Tabs.mjs

Can't import the named export 'useEventListener' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/swipe/Swipe.mjs

Can't import the named export 'usePageVisibility' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tabbar-item/TabbarItem.mjs

Can't import the named export 'useParent' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/lazyload/vue-lazyload/listener.mjs

Can't import the named export 'useRect' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/tabs/Tabs.mjs

Can't import the named export 'useScrollParent' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/calendar/CalendarMonth.mjs

Can't import the named export 'useToggle' from non EcmaScript module (only default export is available)

error in ./node_modules/vant/es/utils/dom.mjs

Can't import the named export 'useWindowSize' from non EcmaScript module (only default export is available)

求大神指点

chenjiahan commented 6 months ago

Vue 2 请使用 Vant 2.x 版本

Vant 4 对应的是 Vue 3

hairuiVR commented 6 months ago

Vue 2 请使用 Vant 2.x 版本

Vant 4 对应的是 Vue 3

我项目是vue2 老项目了 ,但是我现在是想使用vant4里面的FloatingPanel 浮动面板 需要这个组件 有没有方法

chenjiahan commented 6 months ago

没有呢,只能升级 Vue 3