Skip to content

clsx crashes NextJS app with Deno #5

Open
@PabloGracia

Description

@PabloGracia

I can repro this issue very easily with a few basic steps following Deno's guide to use with NextJS.

Step 1: Create a new NextJS app with the following command: deno run -A npm:create-next-app@latest

Step 2: Add @nick/clsx as a dependency in the project through deno add jsr:@nick/clsx

Step 3: Modify the page.tsx file so that you import and call the clsx function from the clsx package:

import Image from "next/image";

import { clsx } from "@nick/clsx";

export default function Home() {
  console.log(clsx("a", "b"));
  return (
//...
)
}

Step 4: Start your app through deno task dev

You will see the app crashing with the following error:

⨯ Failed to handle request for /
error: Uncaught TypeError: (0 , _module.findSourceMap) is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions