Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Using Flowbit in AlephJS #568

Description

@mcgear

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions