lelandrichardson / react-primitives

Primitive React Interfaces Across Targets
MIT License
3.09k stars 108 forks source link

Build issue with RNW 0.11.2 persists in a demo app #131

Closed brodycj closed 5 years ago

brodycj commented 5 years ago

Description

If I would try version 0.7.1 with react-native-web version 0.11.2 in https://github.com/brodybits/react-native-web-starter/tree/demo-with-react-primitives-build-issue, then I continue to experience the build issue reported in #129. Here is the output from the failed build:

./node_modules/react-primitives/lib/injection/react-native-web.js
Module not found: Can't resolve 'react-native-web/dist/cjs/exports/StyleSheet/ReactNativeStyleResolver' in '/Users/brodybits/dev/react-native-web-starter/node_modules/react-primitives/lib/injection'

My reproduction is based on a "Frankenstein" starter app by @joefazz. I suspect it should be possible to apply a workaround in the build, would personally favor a cleaner solution.

Workarounds

This issue would disappear if I would try the following:

How to reproduce

A possible solution

mathieudutour commented 5 years ago

That should just be a warning tho, right? (not ideal for sure but trying to understand)

mathieudutour commented 5 years ago

So I published 0.8 which bumps react-native-web to 0.11 and use react-360 instead of react-vr

brodycj commented 5 years ago

That should just be a warning tho, right?

I get a build error on react-native-web-starter, also if I would use Razzle web server. The build error is reproduced by the project I posted on GitHub. The web page shows a build error in case of both react-native-web-starter and the Razzle web server.

UPDATED: I see no warning or error with version 0.8.0 (my bad).

mathieudutour commented 5 years ago

I get a build error on react-native-web-starter, also if I would use Razzle web server

I'd say that's an issue with your configuration. Webpack only shows a warning as it should.

brodycj commented 5 years ago

My bad, looks like you did solve it in 0367d9856488cbcb2939776590c9127dabb5d3e2. I will test it and confirm.

brodycj commented 5 years ago

Thanks @mathieudutour for the quick updates, version 0.8.0 works for me like a charm on both brodybits/react-native-web-starter and Razzle web server. No warning message, no error message with RNW 0.11.2.