Closed berstend closed 7 years ago
Seems to be a compatibility issue with react-native-web. It is not ready for react 16 yet. Look at the note here.
rm -rf node_modules
yarn install or npm i
yarn run web --reset-cache
Do tell me if this works for you. I'll update the dependencies and add a note in readme.
Great, thanks for the fast reply @amoghbanta
I've followed your instructions (as well as removing the yarn.lock
file) and got this error:
Failed to compile.
Error in ./~/react-native-web/dist/index.js
Module build failed: ReferenceError: Unknown plugin "transform-react-remove-prop-types" specified in "/Users/User/dev/testing/react-native/r10/node_modules/react-native-web/package.json" at 0, attempted to resolve relative to "/Users/User/dev/testing/react-native/r10/node_modules/react-native-web"
at Array.map (native)
@ ./index.web.js 1:164-187
After adding babel-plugin-transform-react-remove-prop-types
as dependency the above error was resolved and the demo runs smoothly now. 🎉
Thanks a lot!
I had the same issues with the fresh install. I'm currently trying to play with React 16 which was installed anyway as the dependency of react-native@0.49.3, so I have upgraded react-dom too. Have hit all these 3 errors, the final one being somethign wrong with the config in my understanding. So I had to add it to my dev dep too but that shouldn't be needed: https://github.com/necolas/react-native-web/issues/607
Hi there,
after following the latest install-with-template instructions and running
yarn run web
the following error appears:Steps:
I thought that maybe
react-dom
is too old and upgraded to16.0.0-alpha.12
, which changed the error to:Any idea where the issue might be?
I've added my current package.json here: https://gist.github.com/berstend/02e2b3b8319a051f86353789afec6cff