I’ve encountered a weird error that I thought I’d reach out to the community for help with. I have an app that uses the library react-native-xml2js (https://www.npmjs.com/package/react-native-xml2js). I’m using it to parse some RSS feeds. This library was working in Expo 22. I updated to Expo 24 and now the app and library work fine locally, but throw an error when published.
To be more specific, I have found that it works fine when serving up the app from my computer (via localhost and via tunneling) to my phone or to my simulator. But the exact same code when published does not work on either my phone or simulator and creates the following error within the react-native-xml2js library:
ReferenceError: Can’t find variable: dc
I went straight from Expo 22 to Expo 24, so I’m not sure if this is also reproducible in Expo 23 or not. For reference, I’m using the latest version of exp (47.4.4).
Initially, I thought it may have been something with the library. But given that it works when running locally, I thought it might instead have to do with the publishing process.
Any idea why I might be seeing this difference in behavior between the published version of the app and the locally served up version of the app? Anyone else seeing similar behavior where something works locally but not when published?