0

I create a new React Native project and install @shoutem/ui in project and include the Examples component of Shoutem UI into React Native app.

import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { Examples } from '@shoutem/ui';

class HelloWorld extends Component {
  render() {
    return (
      <Examples />
    );
  }
}

AppRegistry.registerComponent('HelloWorld', () => HelloWorld);

But when I run start the project , I get "Unknown named module: 'react/lib/NativeMethodsMixin'" error.

Tommz
  • 3,393
  • 7
  • 32
  • 44
Kais
  • 1,925
  • 3
  • 23
  • 35

2 Answers2

2

The bug seems to be inside the @shoutem/animation module, in the Parallax.js file: https://github.com/shoutem/animation/blob/develop/Parallax.js NativeMethodsMixin is not imported correctly from react:

If you change this: import NativeMethodsMixin from 'react/lib/NativeMethodsMixin'; to this: import NativeMethodsMixin from 'react'; your app should work.

I would either file a Github issue on the @shoutem/animation project or check if the way NativeMethodsMixin is imported is specific to an older version of react and then use that version in your app.

I hope this helps.

Andrei Pitea
  • 478
  • 4
  • 9
0

This is fixed as of v0.8.9 release of @shoutem/animation.

Tommz
  • 3,393
  • 7
  • 32
  • 44