Umi4 SSR doesn't work?
See original GitHub issueHi,
Couldn’t make SSR working while migrating from Umi3 to Umi4 (4.0.8
), if I added the ssr
key into config (.umirc.js
) this way:
export default {
svgr: {},
ssr: {
serverBuildPath: './dist/umi.server.js'
}
};
No change if I put it in a basic way:
export default {
svgr: {},
ssr: {}
};
umi dev
and umi setup
throw an error
> umi-ssr@2.0.0 run
> umi dev
fatal - Error: Parse error @:26:41
at parse (/Projects/umi/umi-ssr/node_modules/@umijs/bundler-utils/compiled/es-module-lexer/index.js:1:511)
at parseModuleSync (/Projects/umi/umi-ssr/node_modules/@umijs/bundler-utils/dist/index.js:46:43)
at parseModule (/Projects/umi/umi-ssr/node_modules/@umijs/bundler-utils/dist/index.js:36:10)
at async getModuleExports (/Projects/umi/umi-ssr/node_modules/@umijs/preset-umi/dist/features/tmpFiles/getModuleExports.js:29:24)
at async getRoutes (/Projects/umi/umi-ssr/node_modules/@umijs/preset-umi/dist/features/tmpFiles/routes.js:107:78)
at async Hook.fn (/Projects/umi/umi-ssr/node_modules/@umijs/preset-umi/dist/features/appData/appData.js:37:19)
at async /Projects/umi/umi-ssr/node_modules/@umijs/core/dist/service/service.js:114:25 {
idx: 569
}
my package.json
is like this:
{
"name": "umi-ssr",
"version": "2.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"scripts": {
"postinstall": "umi setup",
"run": "umi dev",
"build": "umi build --clean"
},
"dependencies": {
"ahooks": "^3.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"umi": "^4.0.8",
"unirest": "^0.6.0"
},
"devDependencies": {
"@umijs/plugins": "^4.0.8",
"express": "^4.18.1"
}
}
Is ssr
still a part of UmiJs, or it was removed? Because I don’t see it listed on https://umijs.org/docs/api/config either…
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Server-side rendering broken after upgrading to MUI 5 (with ...
I launched the official SSR Next.js implementation. It showed it doesn't work either. Server-side rendering with JavaScript disabled. For more ...
Read more >hint: if you don't want pnpm to fail on peer dependency issues, add ...
Following the guidelines in CONTRIBUTING.md, I run pnpm install and it seems to finish- but it does have some peer dependency issues:.
Read more >Zehel - Umi's Birthday "Brilliant Jewelry" Box Scouting! [Mar 9, 12am ...
•50 cards (1 Brilliant Jewelry UR Umi, 4 SSR, 45 SR) •Paid Scout •Reset box indefinitely ... •100 cards (1 random Birthday UR...
Read more >Using Non-SSR Friendly Components with Next.js
But, there can be instances where you will not need SSR for one or more Next.js ... when working with applications that use...
Read more >Server Side Rendering - Emotion
The default approach works with streaming and requires no additional configuration, but does not work with nth child or similar selectors.
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
Please provide a minimal reproduction. @skitsanos
@sorrycc, here is the demo branch with an issue https://github.com/skitsanos/umi-ssr/tree/umi4