React-native-swiper: Attempted import error: 'Swiper' is not exported from 'react-native-swiper'.

Created on 11 May 2020  路  4Comments  路  Source: leecade/react-native-swiper

Which OS ?

Web expo

Version

Which versions are you using:

  • react-native-swiper v1.6
  • react-native v0.62

Expected behaviour

No import problem

Actual behaviour

Attempted import error: 'Swiper' is not exported from 'react-native-swiper'.

How to reproduce it>

create new expo project add swiper somewhere

How to fix it>

replace :
module.exports = Swiper;
module.exports.default = Swiper;
by
export default Swiper
export {Swiper}

help wanted 馃悰bug

Most helpful comment

try with:

import Swiper from 'react-native-swiper/src';

All 4 comments

try with:

import Swiper from 'react-native-swiper/src';

same here.

try with:

import Swiper from 'react-native-swiper/src';

this works, but is a hacky work around as it shows an issue in TypeScript compiler.

I got the same error:
Attempted import error: 'react-native-swiper' does not contain a default export (imported as 'Swiper').

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kliuj picture kliuj  路  3Comments

nicolabortignon picture nicolabortignon  路  3Comments

kylehagler picture kylehagler  路  3Comments

ghost picture ghost  路  3Comments

diegolmello picture diegolmello  路  3Comments