Vite: Build Error with swiper

Created on 12 Aug 2020  路  9Comments  路  Source: vitejs/vite

Describe the bug

Cannot build with swiper

Reproduction

Create a fresh vitejs app and add swiper

yarn add swiper

Go to App.vue and simply load and call swiper

import { Swiper } from 'swiper'
console.log(Swiper)

Try to build

No Error with yarn dev

It's apparently not a swiper issue

System Info

  • required vite version: 1.0.0-rc4
  • required Operating System: Linux Ubuntu
  • required Node version: 12.11.1

Logs (Optional if provided reproduction)

Screen Shot 2020-08-11 at 11 49 25 AM

pending triage

All 9 comments

It's seems to be related to that issue in Vue :
https://github.com/vuejs/vue-next/issues/1806

Thanks for @Frulko clarify.Close this and track in vuejs/vue-next#1806

I confirm w/ the bug-fix inside vue-next issue fix the problem. I've just test the case.

@Frulko @underfin Not working for me, i've just try right now with vue 3.0.0 rc7.

yarn create vite-app test-swiper-vite
cd test-swiper-vite
yarn add swiper

in App.vue

import { Swiper } from 'swiper'
console.log(Swiper)

yarn build and boom error

Screen Shot 2020-08-24 at 8 04 28 AM

I'm miss something ?

It seems to be a new error, I will check that later today.

I will keep you inform about any tips which could help you 馃槂

@stephanedemotte .You can remove node_modules and re-install deps. It caused by @vue/shared is not lasted version after upgrade vue.

@underfin I've try with a fresh install

I tested it but not get error.

Ive try with yarn clear cache it's seem to work now.

Thanks for all !!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pd4d10 picture pd4d10  路  3Comments

Hoverhuang-er picture Hoverhuang-er  路  3Comments

duanxianze picture duanxianze  路  3Comments

cmwhited picture cmwhited  路  3Comments

wobsoriano picture wobsoriano  路  4Comments