infinitered / ignite-bowser

Bowser is now re-integrated into Ignite CLI! Head to https://github.com/infinitered/ignite to check it out.
https://infinite.red/ignite
MIT License
615 stars 140 forks source link

Generated app doesn't compile for web (Module not found: Can't resolve './RCTNetworking') #323

Open magaman384 opened 4 years ago

magaman384 commented 4 years ago

I have generated a new app using Ignite and Expo. After trying to compile it for web, it has failed with:

 web  Failed to compile. 
C:/<app_path>/node_modules/react-native/Libraries/Network/XMLHttpRequest.js 
Module not found: Can't resolve './RCTNetworking' in 'C:\<app_path>\node_modules\reactnative\Libraries\Network' error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Versions used:

sean-m-oleary commented 4 years ago

I have the same issue.

sean-m-oleary commented 4 years ago

Is anyone working on fixing this already? Just wondering... We're dead in the water here and can't even start to use Bower because of it.

mariasamuel commented 4 years ago

I found a work around. Since i use web part only for quick testing or debugging. I did the following to atleast run the app successfully on web.

Created a copy of reactotron.ts, named it reactotron.web.ts

Commented out the following section // hookup middleware if (this.config.useAsyncStorage) { Tron.setAsyncStorageHandler(AsyncStorage) } Tron.useReactNative({ asyncStorage: this.config.useAsyncStorage ? undefined : false, })

amit00978 commented 4 years ago

Today I get the same issue, anyone, here who solved the issue?

s-kuniyoshi commented 4 years ago

I solved it.

First. you have to install "reactotron-react-js". Second. copy reactotron.ts to reactotron.web.ts and fix it to above comment by @mariasamuel . And fix import file "reactotron-react-native" to "reactotron-react-js" just like this

//import Tron from "reactotron-react-native"
import Tron from "reactotron-react-js"

maybe it will be work

ncperng commented 4 years ago

It works here. Thank @s-kuniyoshi.

sean-m-oleary commented 4 years ago

works for me too! Then i run into an error with the logo not loading... it's because on the web it doesn't play nice with logo-ignite@1x.png / logo-ignite@2x.png being referenced as just logo-ignite.png... so just copy logo-ignite@2x.png to logo-ignite.png and then it loads. :)

jerrybuks commented 3 years ago

works for me too! Then i run into an error with the logo not loading... it's because on the web it doesn't play nice with logo-ignite@1x.png / logo-ignite@2x.png being referenced as just logo-ignite.png... so just copy logo-ignite@2x.png to logo-ignite.png and then it loads. :)

@lanman2000 could you please explain what you mean by "just copy logo-ignite@2x.png to logo-ignite.png and then it loads." running into the same issue but don't know how to resolve it

parsa-ra commented 3 years ago

Isn't there any fix for those who want to generate all three platforms (web, android, ios) from the same source code?

gruckionvit commented 3 years ago

https://dev.to/expolovers/using-cross-tools-with-expo-web-and-native-3n81 https://medium.com/@sirpeas/intro-to-reactotron-setup-53047a7a2c6b

This will help

mariomurrent-softwaresolutions commented 1 year ago

I solved it.

First. you have to install "reactotron-react-js". Second. copy reactotron.ts to reactotron.web.ts and fix it to above comment by @mariasamuel . And fix import file "reactotron-react-native" to "reactotron-react-js" just like this

//import Tron from "reactotron-react-native"
import Tron from "reactotron-react-js"

maybe it will be work

Which reactotron.ts file do you mean?