TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" with bits-ui lib

Author: akawahuynhCreated Mar 20, 2026Updated Jul 14, 2026
Labelstriage

Describe the bug

Using shadcn-svelte with monorepo has error │TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" for ... node_modules/bits-ui/dist/bits/utilities/portal/portal.svelte

Reproduction

Link show: https://codesandbox.io/p/devbox/h9dmrr?file=%2Fapps%2Fweb%2Fsrc%2Froutes%2F%2Bpage.svelte&migrateFrom=4gjkct

Logs

bash

System Info

bash
System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 2.25 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.12.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm

Severity

blocking all usage of shadcn-svelte