question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't find variable: __webpack_require__

See original GitHub issue

Environment

React Native: 0.69.7 Repack: 3.0.0 Webpack: 5.75.0 OS: Windows10 64bit

Description

I create an demo to learn repack and followed the docs to configure the demo. everything works fine until I configured the code-splitting section. It starts to report error like below:

ERROR ReferenceError: Can’t find variable: webpack_require ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

Reproducible Demo

https://github.com/chj-damon/repackDemo

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chj-damoncommented, Dec 23, 2022

sorry about that. I’ve made it public now.

0reactions
RafikiTikicommented, Dec 22, 2022

@chj-damon maybe the repo is private? I’m still getting 404. I’m going to have some time around Wednesday next week to look into repack issues – please send a working repo link by then 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: Can't find variable: require. [karma, webpack]
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR ReferenceError: Can't find variable: require at index.js:1. I am following official vue documentation ...
Read more >
Webpack Encore causes ReferenceError: Can't find variable ...
My problem is that some JS files are not being loaded so it causes functions to be not found. Here is my webpack...
Read more >
Module Methods - webpack
This section covers all methods available in code compiled with webpack. When using webpack to bundle your application, you can pick from a...
Read more >
Can't find variable: require - Help - PureScript Language Forum
I have managed to create a simple project that compile correctly, but when I try to load the bundled script in the browser...
Read more >
Getting error "Can't find variable: require" : r/learnjavascript
I get an error in my console that says "ReferenceError: Can't find variable: require" when I try to run puppeteer. Here's my script....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found