aleph.js icon indicating copy to clipboard operation
aleph.js copied to clipboard

Using Flowbit in AlephJS

Open mcgear opened this issue 2 years ago • 0 comments
trafficstars

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/[email protected]?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/[email protected]/server/router.ts:38:10) at async fetchRoute (https://deno.land/x/[email protected]/server/router.ts:74:19) at async routeHandler (https://deno.land/x/[email protected]/server/handler.ts:225:21) at async Server.#respond (https://deno.land/[email protected]/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/[email protected]/server/router.ts:38:10) at async fetchRoute (https://deno.land/x/[email protected]/server/router.ts:74:19) at async routeHandler (https://deno.land/x/[email protected]/server/handler.ts:225:21) at async Server.#respond (https://deno.land/[email protected]/http/server.ts:299:18)

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

mcgear avatar Oct 20 '23 17:10 mcgear