Property '__webpack_require__' doesn't exist
See original GitHub issueHey all,
I’ve been using this with our React-Native app, and it works great on iOS. But on Android, it has trouble importing, throwing ReferenceError: Property '__webpack_require__' doesn't exist while trying import anything from @giantmachines/redux-websocket. It appears to be coming from within dist/index.js on line 21:
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
We don’t use webpack anywhere else in our app, so I was suspecting that the problem could have arose from either that, or something to do with the Metro bundler, since on Android everything runs fine while attached to the chrome debugger. Also I’m aware that this library wasn’t necessarily made for React Native, but thought I’d raise this issue in case it was a more widespread problem with using different packagers or something like that.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Related StackOverflow Question
Hi @MichaelDanielTom , thanks for opening this issue. We can look into this. I think I may know what could be going wrong and it’d be tied with how we are building our library. In order to test this assumption, can you upload an example repository which would produce this error? I’ll clone/fork your example and try fixing it locally.
Alexlee500 is right, the build process is the problem in this case. For example if webpack replaced with rollup, then this problem has gone.
This package only implements just that: https://www.npmjs.com/package/@wolftech.app/redux-websocket