"cannot find main in stats"
See original GitHub issueI’m getting a “cannot find main in stats” issue. I would like to have more info as to what this error is about. I follow the sever side rendering guide and my current code set up is this
const statsFile = path.resolve("./build/server/loadable-stats.json");
const extractor = new ChunkExtractor({ statsFile });
// Declare our React application.
const app = extractor.collectChunks(
<JssProvider registry={sheetsRegistry} jss={jss} generateClassName={generateClassName()}>
<MuiThemeProvider theme={theme} sheetsManager={new Map()}>
<Provider store={store}>
<StaticRouter location={request.url} context={reactRouterContext}>
<Application />
</StaticRouter>
</Provider>
</MuiThemeProvider>
</JssProvider>
);
const appString = renderToString(app);
const scriptTags = extractor.getScriptTags(); // or extractor.getScriptElements();
console.log(scriptTags);
This is the error screenshot
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Lodable cannot find 'x' in stats - Frontity Community Forum
Hi, I would like to use 'lodable' in order to split my routes into various bundles. But when i'm trying to use it,...
Read more >There was an error: Invariant Violation: loadable: cannot find ...
reactjs - There was an error: Invariant Violation: loadable: cannot find pages-Home in stats. (@loadable/component) - Stack Overflow. Stack ...
Read more >How can I get a table of basic descriptive statistics for my ...
Let's say we want a table of descriptive statistics for test scores. ... basic statistics such as the number of observations and number...
Read more >Common Issues | Google Ads Scripts
function main() { // Call to getAllCampaigns is missing, so this script does nothing. } ... If you retrieve account-level stats for an...
Read more >CPR Facts and Stats
Read the latest stats and CPR facts, survival rates, success of CPR, ... 55 percent can't get first aid or CPR and AED...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
got it! it was
const extractor = new ChunkExtractor({ statsFile, entrypoints: ["index"] });
I love happy ends 😁