Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve module `react-native/Libraries/StyleSheet/StyleSheetPropType #558

Closed
Conacious opened this issue Feb 22, 2019 · 6 comments

Comments

@Conacious
Copy link

Conacious commented Feb 22, 2019

Environment

Please provide the following information about your environment:
ArchLinux kernel 4.19.23-1-lts
Samsung Galaxy S9 Android 8.0.0

"react-native": "^0.58.5",
   "react-viro": "2.13.0"

Description

Following the get started tutorial from on step 7 got the error that i show you on the image.

viroerror

To reproduce you just have to follow the get started tutorial. It's not working for me. Tried to solve the problem with the terminal output but didn't work.

Thank you.

@maxence-machu
Copy link

maxence-machu commented Feb 27, 2019

Same issue for us

react-native : 0.58.5
react-viro : 2.13.0

I temporary resolved this issue commenting the following code + each PropTypes declaration in the following components

  • node_modules/react-viro/components/ViroParticleEmitter.js
  • node_modules/react-viro/components/ViroImage.js
  • node_modules/react-viro/components/ViroAnimatedImage.js
  • node_modules/react-viro/components/ViroFlexView.js
  • node_modules/react-viro/components/ViroSurface.js
  • node_modules/react-viro/components/ViroButton.js
  • ... (CTRL + F and search 'stylePropType' for to find these components)

var StyleSheetPropType = require('react-native/Libraries/StyleSheet/StyleSheetPropType')
var stylePropType = StyleSheetPropType(ViroPropTypes)

This is a workaround, consider downgrading react-native, 0.57.8 is fine

@kaliatech
Copy link

Seems these PropTypes and a few related classes were fully deprecated in recent releases of React. I think the replacement is a new package prop-types. More info:

In the meantime, I noticed that stubs of the old classes were moved to /react-native/Libraries/DeprecatedPropTypes. So in addition @maxence-machu's suggestion, another short term workaround is to copy/rename the necessary classes to the correct location, or modify the source to point to the deprecated versions. After going back-and-forth I determined there's about 6 classes that have to be moved.

@kaliatech
Copy link

kaliatech commented Apr 5, 2019

I believe this is duplicate of #534. Viro is not compatible with newer versions of React/ReactNative, and that is the reason for the missing StyleSheetPropType and similar classes. Even after resolving these missing classes per previous comments, there are additional issues.

@VikAdvani
Copy link
Contributor

Hi @kaliatech, we are launching a new release shortly which will formally support React 0.59.

@jungley
Copy link

jungley commented Apr 16, 2019

@VikAdvani How soon?

@dam00n
Copy link
Collaborator

dam00n commented Apr 16, 2019

Viro 2.14 was released last week and supports RN 0.59.3. Release notes and upgrade instructions here -> https://docs.viromedia.com/docs/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants