esm-dev/esm.sh

Failed to import - @headlessui/react

Opened this issue · 3 comments

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.

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.

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