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

Failed to import - @headlessui/react #825

Open
nanikit opened this issue May 6, 2024 · 3 comments
Open

Failed to import - @headlessui/react #825

nanikit opened this issue May 6, 2024 · 3 comments
Labels
deno Not working in Deno

Comments

@nanikit
Copy link

nanikit commented May 6, 2024

Background

I tried using @headlessui/react with deno lsp like the following and noticed lsp didn't work.

import { Combobox } from "https://esm.sh/@headlessui/react@1.7.19?external=react,react-dom";

Steps to reproduce

// @deno-types="https://esm.sh/v135/@headlessui/react@1.7.19/X-ZS9yZWFjdCxyZWFjdC1kb20/dist/index.d.ts"
export { Combobox } from "@headlessui/react";

Expected behavior

I can go to type definition of Combobox.

Actual behavior

Module not found "https://esm.sh/v135/client-only@0.0.1/index.d.ts". at https://esm.sh/v135/@headlessui/react@1.7.19/X-ZS9yZWFjdCxyZWFjdC1kb20/dist/index.d.ts:1:8

Actually the content of https://esm.sh/v135/client-only@0.0.1/index.d.ts is Types not found.

@nanikit nanikit added the deno Not working in Deno label May 6, 2024
@nanikit
Copy link
Author

nanikit commented May 10, 2024

I just tried and it didn't work.

I also have tried importing headlessui with npm dependency and preact, and found it is not designed to be used with preact. preact compat is not complete.

@MaDsEm88
Copy link

MaDsEm88 commented May 10, 2024

@nanikit strange as it works just fine inside the Fresh.deno framework which uses preact. Might have to test it out later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

2 participants