Build issue with RNW 0.11.2 persists in a demo app
brodybits opened this issue · comments
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:
- local build from commit a8806b9, which is the first commit of PR #130
- use
react-native-web
version0.10.1
How to reproduce
git clone https://github.com/brodybits/react-native-web-starter
- do
git checkout demo-with-react-primitives-build-issue
in the git clone - do
yarn
to install - do
yarn web
, which will attempt to build and run on the browser
A possible solution
That should just be a warning tho, right? (not ideal for sure but trying to understand)
So I published 0.8 which bumps react-native-web to 0.11 and use react-360 instead of react-vr
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).
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.
My bad, looks like you did solve it in 0367d98. I will test it and confirm.
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.