-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Failed to Compile while trying to run Hello Mobile Navigation with react-native-web #622
Comments
I've been trying to find out how to fix my problem but no success yet. Any help/hint would be much appreciated. |
@mogarick I've fixed this by ejecting on create-create-app and editing the webpack config.
|
Thank you @brunolemos. |
@brunolemos I tried your suggestion but it didin't work at all. What I have observed is:
From that I conclude:
Does anybody can help or give me a hint about how could I dig deeper into this and find the way to make the compilation takes the modifs made to |
@mogarick Just to be clear, it's exactly what I'm doing and it works, so double check other things on your setup. Have you restarted the server after the changes? And which error is it showing? Copy paste here. |
@brunolemos the error is the same I reported since I opened the issue. There is no difference in adding the This is the error in the console from which I execute
This is the overlay error in the browser: both the overlay and the console errors appear less than a second after the browser shows the correct app view. if I comment the line 46 from |
Try changing the |
@mogarick try adding this module to package.json As discussed with @brunolemos it is experimental, but so far I have it as a temporary solution. |
@brunolemos @agrcrobles I'm gonna try your suggestions and report back later. Thank you for your help! |
@brunolemos it didn't work. Thank you anyway! :) @agrcrobles it worked!! 🥇 It looks like the StackNavigator is decorating the |
I am also seeing a similar |
Pinging OP @mogarick since this issue is quite old and related to an old version of the lib. If no answer I'll close in 7 days. |
@kelset I am running beta13 and have the same problem and the suggestion from @agrcrobles is the only hint I've found that has helped, hence I believe this case should remain open. |
@ajostergaard I have created that polyfill ( it just an alias in webpack ) as an experiment so that I could test native navigators + react-native-web but I found that is not supported and not recommended by react-native-web. |
if someone would like to add support for this to react-navigation, please let me know and we can discuss! I think this would be really nice to have, but we need to have someone who is willing to own it and push it forward |
Hi,
I'm trying to run the Hello Mobile Example for a new
create-react-app
withreact-native-web
installed but I'm getting the following error:I opened the first file mentioned in the error trace (
TabViewAnimated (11:12)
) and the problem looks related to Flow:My VSCode indicates the error for the line as
[js] 'import ... =' can only be used in a .ts file.
for theimport type {
part of the line.Is there anything additional to setup for adding support for Flow?
I can see in the
node_modules
thatfbjs
is installed which has flow inside.Just in case, this is the code for the
App.js
(you can note I modified the import as mentioned in #423 because that was the first error I got)Is it something I'm missing or a bug?
My setup process was:
create-react-app myapp
npm install "react-native-web"
npm install "react-navigation"
(Got 2 warnings:warning "[email protected]" has unmet peer dependency "react-native@".
warning "[email protected]" has unmet peer dependency "react-native@".)
npm start
Thank you in advance for the help.
The text was updated successfully, but these errors were encountered: