Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

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

Open
magaman384 opened this issue Mar 17, 2020 · 11 comments

Comments

@magaman384
Copy link

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:

  • Windows 7 64-bit Pro SP1
  • nodejs v10.15.3
  • yarn v1.22.4
  • expo-cli v3.15.4
  • ignite-cli v3.5.1
@sean-m-oleary
Copy link

I have the same issue.

@sean-m-oleary
Copy link

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
Copy link

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
Copy link

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

@s-kuniyoshi
Copy link

s-kuniyoshi commented Jul 26, 2020

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
Copy link

ncperng commented Sep 18, 2020

It works here. Thank @s-kuniyoshi.

@sean-m-oleary
Copy link

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 [email protected] / [email protected] being referenced as just logo-ignite.png... so just copy [email protected] to logo-ignite.png and then it loads. :)

@jerrybuks
Copy link

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 [email protected] / [email protected] being referenced as just logo-ignite.png... so just copy [email protected] to logo-ignite.png and then it loads. :)

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

@parsa-ra
Copy link

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

@mariomurrent-softwaresolutions

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants