Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: export 'Html' not found in '@kitajs/html' #759

Closed
entrptaher opened this issue Jul 26, 2024 · 3 comments
Closed

SyntaxError: export 'Html' not found in '@kitajs/html' #759

entrptaher opened this issue Jul 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@entrptaher
Copy link

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"
  }
@entrptaher entrptaher added the bug Something isn't working label Jul 26, 2024
@x4132
Copy link

x4132 commented Jul 27, 2024

elysiajs/elysia-html#91 Probably should put the issue in the plugin repo

gnimmelf added a commit to gnimmelf/kita-site that referenced this issue Jul 28, 2024
@x4132
Copy link

x4132 commented Aug 4, 2024

Fix unnecessary as kitajs 4.2.1 fixes the issue.

@SaltyAom
Copy link
Member

SaltyAom commented Aug 4, 2024

Closing as kita 4.2.1 released

@SaltyAom SaltyAom closed this as completed Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants