Error upgrading headlessui
Hello! I'm trying to upgrade headlessui/react to version 2.0.4 and running into an error.
Here is what my deno.json looked like previously, which was importing
Any ideas? Thanks in advance!
2 Replies
I wasn't able to find the answer to your question in the official Deno documentation.
However, based on the error message you provided, it seems like the import path for
@floating-ui/react
is not correctly formatted. In Deno, relative import paths must be prefixed with /
, ./
, or ../
. If @floating-ui/react
is meant to be an external module, it should be included in your import map with a full URL.
In your deno.json
import map, I don't see an entry for @floating-ui/react
. You might need to add an entry for it, similar to how you've mapped other packages. For example:
Replace version
with the specific version you want to import.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. It's also possible that there might be other issues or context that I'm not aware of, so please consider this as a potential starting point for troubleshooting the issue.When you use the * inside the imported package it will retrieve packages that is also used in this case floating ui react, so try Importing that also with wrapping it with the alias, but without the *, but I know a lot of people have trouble with headless ui after the new version came out https://discord.com/channels/684898665143206084/991511118524715139/1240955650352349205, so some go back to a previous version for now
Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.