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

Using Flowbit in AlephJS #568

Open
mcgear opened this issue Oct 20, 2023 · 0 comments
Open

Using Flowbit in AlephJS #568

mcgear opened this issue Oct 20, 2023 · 0 comments

Comments

@mcgear
Copy link

mcgear commented Oct 20, 2023

I am trying to use flowbite in an aleph react app with mdx.

I started with the following:
deno run -A -r https://alephjs.org/init.ts --template=react-mdx

Then i tried adding an import map:

"flowbite-react": "https://esm.sh/flowbite-react@0.6.4?external=react,react-dom,react%2Fjsx-runtime"

And also tried using the import npm: syntax:

 import { Card } from 'npm:flowbite-react';

I am receiving the following error:

I get the following error with import map:
TypeError: Relative import path "flowbite-react?ssr&v=lnyvoam2" not prefixed with / or ./ or ../ and not in import map from "http://localhost:8000/routes/index.tsx?ssr&v=lnyvoam5"
at �[0m�[36mhttp://localhost:8000/routes/index.tsx?ssr&v=lnyvoam5�[0m:�[0m�[33m2�[0m:�[0m�[33m22�[0m
at async importRouteModule (https://deno.land/x/aleph@1.0.0-beta.44/server/router.ts:38:10)
at async fetchRoute (https://deno.land/x/aleph@1.0.0-beta.44/server/router.ts:74:19)
at async routeHandler (https://deno.land/x/aleph@1.0.0-beta.44/server/handler.ts:225:21)
at async Server.#respond (https://deno.land/std@0.192.0/http/server.ts:299:18)

And the following with npm: import:
TypeError: npm package 'flowbite-react?ssr&v=lnyvoam2' does not exist.
at �[0m�[36mhttp://localhost:8000/routes/index.tsx?ssr&v=lnyvoam4�[0m:�[0m�[33m2�[0m:�[0m�[33m22�[0m
at async importRouteModule (https://deno.land/x/aleph@1.0.0-beta.44/server/router.ts:38:10)
at async fetchRoute (https://deno.land/x/aleph@1.0.0-beta.44/server/router.ts:74:19)
at async routeHandler (https://deno.land/x/aleph@1.0.0-beta.44/server/handler.ts:225:21)
at async Server.#respond (https://deno.land/std@0.192.0/http/server.ts:299:18)

What are the steps to use flowbite-react in this solution?

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

No branches or pull requests

1 participant