React-native-paper: [bug] build error occurred if using the version 2.2.0 and the switch component

Created on 6 Nov 2018  路  5Comments  路  Source: callstack/react-native-paper


Current behaviour

Build error occurred with version 2.2.0:

error: bundling failed: Error: Unable to resolve module `ReactNativeVersion` from `.../node_modules/react-native-paper/src/components/Switch.js`: Module `ReactNativeVersion` does not exist in the Haste module map

It is possible that the problem is in this code: https://github.com/callstack/react-native-paper/commit/4aa7addb87ed129e546974f6ebf6dee549bb4d90

Expected behaviour

A project with react-native-paper build without an error.

Code sample

Snack example

Screenshots (if applicable)

screenshot 2018-11-06 at 08 36 15

Your Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 180.89 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - /var/folders/k9/4flyk9zs5ds9_qr79mk6mqfr0000gn/T/yarn--1541489863070-0.02963383312171719/node
      Yarn: 1.12.1 - /var/folders/k9/4flyk9zs5ds9_qr79mk6mqfr0000gn/T/yarn--1541489863070-0.02963383312171719/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @types/react-native: 0.57.7 => 0.57.7 
      react: 16.5.1 => 16.5.1 
      react-native: 0.57.1 => 0.57.1 
      react-native-paper: 2.2.0

Most helpful comment

Jesus! @MrIceman you must be perfect right? You never commited a bug before? Just wait for the fix! Can't you live with that?

All 5 comments

Yes, I can confirm this. The commit by @satya164 broke the lib. Maybe installing that package fixes the problem.

Which is that package? And why isn't it in the dependencies?

@tzitziras I don't what is the package. And it is not there because @satya164 forgot to add it. Just install the previous version, 2.1.3 and wait for a fix to then upgrade again 馃槂

Jesus! @MrIceman you must be perfect right? You never commited a bug before? Just wait for the fix! Can't you live with that?

just fixed by @satya164 - see latest commit (v2.2.1)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

talaikis picture talaikis  路  3Comments

timothystewart6 picture timothystewart6  路  4Comments

mihaidaviddev picture mihaidaviddev  路  3Comments

ButuzGOL picture ButuzGOL  路  4Comments

yaronlevi picture yaronlevi  路  3Comments