Repository: ui
Issue: [bug]: Combining Deno2 with NEXT.js and shadcn is failing
Labels: bug

### Describe the bug

Currently, I am trying to run NEXT.js with Deno2 and shadcn. Everything is working till I want to start adding shadcn components in my project. 

- The issue is only coming up if I add a shadcn button in my page.tsx
- Webpack is installed
- Tested with a fresh project

I got following output after doing shadcn init and adding a button and start next.js with deno task dev: 

As an Error in Next.js 
```bash
Error: __webpack_modules__[moduleId] is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
__webpack_require__
file:/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js (33:42)
eval
/./lib/utils.ts, <anonymous>
Object.(rsc)/./lib/utils.ts
file:/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js (173:1)
```

In the CLI:
```bash
deno task dev
Task dev next dev
  ▲ Next.js 14.2.15
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 3.3s
 ○ Compiling /_not-found ...
 ✓ Compiled /_not-found in 7.1s (475 modules)
 GET /_next/static/webpack/5d24c43cbc296b0b.webpack.hot-update.json 404 in 7649ms
 ⚠ Fast Refresh had to perform a full reload due to a runtime error.
 ✓ Compiled in 765ms (239 modules)
 ○ Compiling / ...
 ✓ Compiled / in 1095ms (525 modules)
 ⨯ TypeError: __webpack_modules__[moduleId] is not a function
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./lib/utils.ts, <anonymous>:6:72)
    at Object.(rsc)/./lib/utils.ts (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:173:1)
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./components/ui/button.tsx, <anonymous>:12:68)
    at Object.(rsc)/./components/ui/button.tsx (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:162:1)
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./app/page.tsx, <anonymous>:8:79)
    at Object.(rsc)/./app/page.tsx (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:151:1)
    at Function.__webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eventLoopTick (ext:core/01_core.js:214:9)
    at async Promise.all (index 0)
digest: "773026919"
...
...
...
 GET / 500 in 272ms
 ○ Compiling /favicon.ico ...
 ✓ Compiled /favicon.ico in 841ms (354 modules)
 GET /favicon.ico 200 in 1039ms
´´´

### Affected component/components

Run dev server

### How to reproduce

```bash
deno run -A npm:create-next-app@latest
cd demo
deno task dev    # Next.js started
deno install npm:shadcn@latest 
npx shadcn init
npx shadcn add button
# added component like in the next session
deno task dev # failed
```

code:
```js
import { Button } from "@/components/ui/button";

export default function Home() {
  return (
        <Button/>
  );
}
```

### Codesandbox/StackBlitz link

is not possible because its a startup issue and not a code issue

### Logs

```bash
deno task dev
Task dev next dev
  ▲ Next.js 14.2.15
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 3.3s
 ○ Compiling /_not-found ...
 ✓ Compiled /_not-found in 7.1s (475 modules)
 GET /_next/static/webpack/5d24c43cbc296b0b.webpack.hot-update.json 404 in 7649ms
 ⚠ Fast Refresh had to perform a full reload due to a runtime error.
 ✓ Compiled in 765ms (239 modules)
 ○ Compiling / ...
 ✓ Compiled / in 1095ms (525 modules)
 ⨯ TypeError: __webpack_modules__[moduleId] is not a function
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./lib/utils.ts, <anonymous>:6:72)
    at Object.(rsc)/./lib/utils.ts (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:173:1)
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./components/ui/button.tsx, <anonymous>:12:68)
    at Object.(rsc)/./components/ui/button.tsx (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:162:1)
    at __webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eval (./app/page.tsx, <anonymous>:8:79)
    at Object.(rsc)/./app/page.tsx (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/app/page.js:151:1)
    at Function.__webpack_require__ (/Users/felix/Workspace/Stuff/denodemo/demo/.next/server/webpack-runtime.js:33:42)
    at eventLoopTick (ext:core/01_core.js:214:9)
    at async Promise.all (index 0)
digest: "773026919"
...
...
...
 GET / 500 in 272ms
 ○ Compiling /favicon.ico ...
 ✓ Compiled /favicon.ico in 841ms (354 modules)
 GET /favicon.ico 200 in 1039ms
```


### System Info

```bash
MacOS Sonoma, Firefox, ...
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues