SyntaxError: export 'Html' not found in '@kitajs/html'
entrptaher opened this issue · comments
Md. Abu Taher commented
What version of Elysia.JS is running?
"elysia": "^1.1.4"
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Simply install @elysiajs/html
as per the doc.
import { Elysia } from "elysia";
import { html } from "@elysiajs/html";
new Elysia()
.use(html())
.get(
"/html",
() => `
<html lang='en'>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>`
)
.get("/jsx", () => (
<html lang="en">
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
))
.listen(30001);
What is the expected behavior?
No errors.
What do you see instead?
1 | (function (entry, fetcher)
^
SyntaxError: export 'Html' not found in '@kitajs/html'
Additional information
Seems a version specific problem from @kitajs/html
in their latest version 4.2.0
, the following to the package.json
fixes this issue for now.
"overrides": {
"@kitajs/html": "4.1.0"
}
x4132 commented
elysiajs/elysia-html#91 Probably should put the issue in the plugin repo
x4132 commented
Fix unnecessary as kitajs 4.2.1 fixes the issue.
SaltyAom commented
Closing as kita 4.2.1 released