ReferenceError: Can't find variable: __webpack_require__
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react-native, webpack
- Domain
- build-system, mobile
Research direction
Start in host-app/index.js and reproduce the issue with React Native 0.72.3, Re.Pack 3.7.0, and webpack-start using the reported host configuration. Trace the webpack startup and bundle loading path around the reported webpack_require error. Done means the host app starts without the ReferenceError and receives the local webpack bundle.
Written by the indexing model from the issue text.
Description
Environment
Host app
React Native: 0.72.3
Repack: 3.7.0
Webpack: 5.91.0
OS: MacOS 13.6.3 - Chip M1 Pro
Xcode: 15.2
Description
I've cloned your repo, I move into host-app, setup environment callstack/repack. I stop metro and run react-native webpack-start with host is my IP Address but it show this, i think it doesn't receive the webpack local
Thank you.
Here is my index.js
import {AppRegistry} from 'react-native';
import App from './src/App';
import {name as appName} from './app.json';
import {ScriptManager, Federated} from '@callstack/repack/client';
ScriptManager.shared.addResolver(async (scriptId, caller) => {
const resolveURL = Federated.createURLResolver({
containers: {
MiniApp: 'http://localhost:9000/[name][ext]',
},
});
const url = resolveURL(scriptId, caller);
if (url) {
return {
url,
query: {
platform: Platform.OS,
},
};
}
});
ScriptManager.shared.on('resolving', (...args) => {
console.log('DEBUG/resolving', ...args);
});
ScriptManager.shared.on('resolved', (...args) => {
console.log('DEBUG/resolved', ...args);
});
ScriptManager.shared.on('prefetching', (...args) => {
console.log('DEBUG/prefetching', ...args);
});
ScriptManager.shared.on('loading', (...args) => {
console.log('DEBUG/loading', ...args);
});
ScriptManager.shared.on('loaded', (...args) => {
console.log('DEBUG/loaded', ...args);
});
ScriptManager.shared.on('error', (...args) => {
console.log('DEBUG/error', '111111111111');
console.log('DEBUG/error', ...args);
});
AppRegistry.registerComponent(appName, () => App);
- Dominant language
- Java
- Stars
- 40
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/super-app-example
-
question
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstack/super-app-example#9 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
question
Difficulty 3/5 1-2 days Newbie friendliness 20/100
callstack/super-app-example#4 · 16 comments ·
All issues in callstack/super-app-example
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100