tsup build is failing on me when dts is enabled
cli output
> [email protected] build C:\Users\denni\Desktop\code\workspace\shadcn-ui-fanedition\packages\ui
> tsup
CLI Building entry: src/index.ts, src/components/alert/index.ts, src/components/alert-dialog/index.ts, src/components/accordion/index.ts, src/components/aspect-ratio/index.ts, src/components/avatar/index.ts, src/components/badge/index.ts, src/components/button/index.ts, src/components/calendar/index.ts, src/components/card/index.ts, src/components/checkbox/index.ts, src/components/collapsible/index.ts, src/components/command/index.ts, src/components/context-menu/index.ts, src/components/dialog/index.ts, src/components/dropdown-menu/index.ts, src/components/hover-card/index.ts, src/components/input/index.ts, src/components/label/index.ts, src/components/menubar/index.ts, src/components/popover/index.ts, src/components/navigation-menu/index.ts, src/components/progress/index.ts, src/components/radio-group/index.ts, src/components/scroll-area/index.ts, src/components/select/index.ts, src/components/separator/index.ts, src/components/sheet/index.ts, src/components/skeleton/index.ts, src/components/slider/index.ts, src/components/switch/index.ts, src/components/table/index.ts, src/components/tabs/index.ts, src/components/textarea/index.ts, src/components/toast/index.ts, src/components/toggle/index.ts, src/components/tooltip/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v6.7.0
CLI Using tsup config: C:\Users\denni\Desktop\code\workspace\shadcn-ui-fanedition\packages\ui\tsup.config.ts
CLI Target: esnext
CLI Cleaning output folder
ESM Build start
DTS Build start
"useCallback" is imported from external module "react" but never used in "dist/chunk-DNB5WMWA.js".
ESM dist\components\textarea\index.js 617.00 B
ESM dist\components\tabs\index.js 1.27 KB
ESM dist\components\toggle\index.js 1.08 KB
ESM dist\components\separator\index.js 516.00 B
ESM dist\components\skeleton\index.js 287.00 B
ESM dist\components\tooltip\index.js 786.00 B
ESM dist\components\select\index.js 2.30 KB
ESM dist\components\sheet\index.js 3.41 KB
ESM dist\components\scroll-area\index.js 1001.00 B
ESM dist\components\slider\index.js 884.00 B
ESM dist\components\table\index.js 1.64 KB
ESM dist\components\input\index.js 678.00 B
ESM dist\components\label\index.js 513.00 B
ESM dist\components\popover\index.js 776.00 B
ESM dist\components\navigation-menu\index.js 3.03 KB
ESM dist\components\progress\index.js 579.00 B
ESM dist\components\calendar\index.js 1.81 KB
ESM dist\components\radio-group\index.js 960.00 B
ESM dist\components\card\index.js 1.14 KB
ESM dist\components\checkbox\index.js 853.00 B
ESM dist\components\collapsible\index.js 256.00 B
ESM dist\components\menubar\index.js 4.21 KB
ESM dist\components\hover-card\index.js 615.00 B
ESM dist\components\command\index.js 2.92 KB
ESM dist\components\context-menu\index.js 3.57 KB
ESM dist\chunk-Q37AVSUX.js 2.28 KB
ESM dist\components\dialog\index.js 308.00 B
ESM dist\components\dropdown-menu\index.js 3.85 KB
ESM dist\components\alert\index.js 1.10 KB
ESM dist\index.js 356.00 B
ESM dist\components\alert-dialog\index.js 2.22 KB
ESM dist\components\accordion\index.js 257.00 B
ESM dist\chunk-B2EBCAU5.js 1.13 KB
ESM dist\chunk-4Y755WKG.js 1.39 KB
ESM dist\components\avatar\index.js 816.00 B
ESM dist\chunk-DNB5WMWA.js 1.73 KB
ESM dist\components\button\index.js 222.00 B
ESM dist\components\badge\index.js 877.00 B
ESM dist\chunk-GUWPUQGY.js 980.00 B
ESM dist\chunk-MVYCDPAD.js 778.00 B
ESM dist\components\aspect-ratio\index.js 161.00 B
ESM dist\chunk-72SGZM6M.js 20.12 KB
ESM dist\components\switch\index.js 960.00 B
ESM dist\components\toast\index.js 3.04 KB
ESM dist\components\textarea\index.js.map 1.14 KB
ESM dist\components\toggle\index.js.map 2.45 KB
ESM dist\components\separator\index.js.map 1.32 KB
ESM dist\components\skeleton\index.js.map 612.00 B
ESM dist\components\tooltip\index.js.map 1.60 KB
ESM dist\components\select\index.js.map 5.64 KB
ESM dist\components\sheet\index.js.map 9.47 KB
ESM dist\components\table\index.js.map 4.32 KB
ESM dist\components\label\index.js.map 1.30 KB
ESM dist\components\navigation-menu\index.js.map 6.94 KB
ESM dist\components\progress\index.js.map 1.32 KB
ESM dist\components\calendar\index.js.map 3.51 KB
ESM dist\components\tabs\index.js.map 2.67 KB
ESM dist\components\card\index.js.map 3.09 KB
ESM dist\components\checkbox\index.js.map 1.59 KB
ESM dist\components\radio-group\index.js.map 2.22 KB
ESM dist\components\collapsible\index.js.map 610.00 B
ESM dist\components\menubar\index.js.map 10.54 KB
ESM dist\components\hover-card\index.js.map 1.45 KB
ESM dist\components\command\index.js.map 7.19 KB
ESM dist\components\slider\index.js.map 1.65 KB
ESM dist\chunk-Q37AVSUX.js.map 5.56 KB
ESM dist\components\alert\index.js.map 2.55 KB
ESM dist\components\dropdown-menu\index.js.map 9.62 KB
ESM dist\components\dialog\index.js.map 51.00 B
ESM dist\index.js.map 51.00 B
ESM dist\components\accordion\index.js.map 51.00 B
ESM dist\components\scroll-area\index.js.map 2.53 KB
ESM dist\chunk-4Y755WKG.js.map 5.73 KB
ESM dist\chunk-DNB5WMWA.js.map 9.64 KB
ESM dist\components\avatar\index.js.map 2.20 KB
ESM dist\components\input\index.js.map 1.21 KB
ESM dist\components\button\index.js.map 51.00 B
ESM dist\components\badge\index.js.map 1.91 KB
ESM dist\components\aspect-ratio\index.js.map 364.00 B
ESM dist\chunk-GUWPUQGY.js.map 1.88 KB
ESM dist\chunk-MVYCDPAD.js.map 3.94 KB
ESM dist\chunk-72SGZM6M.js.map 117.68 KB
ESM dist\components\switch\index.js.map 1.62 KB
ESM dist\components\toast\index.js.map 6.63 KB
ESM dist\components\popover\index.js.map 1.65 KB
ESM dist\components\context-menu\index.js.map 9.22 KB
ESM dist\components\alert-dialog\index.js.map 6.79 KB
ESM dist\chunk-B2EBCAU5.js.map 3.01 KB
ESM ⚡️ Build success in 17910ms
node:events:489
throw er; // Unhandled 'error' event
^
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
at new NodeError (node:internal/errors:399:5)
at [kOnExit] (node:internal/worker:310:26)
at Worker.<computed>.onexit (node:internal/worker:226:20)
Emitted 'error' event on Worker instance at:
at [kOnExit] (node:internal/worker:310:12)
at Worker.<computed>.onexit (node:internal/worker:226:20) {
code: 'ERR_WORKER_OUT_OF_MEMORY'
}
Node.js v20.1.0
ELIFECYCLE Command failed with exit code 1.
import { defineConfig } from 'tsup'
export default defineConfig({
dts: true,
minify: true,
sourcemap: true,
treeshake: true,
splitting: true,
clean: true,
external: ['react', 'react-dom'],
entry: [
"src/index.ts",
"src/components/**/index.ts",
],
format: ['esm'],
})
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too