tsup build failed with flag --dts
yyyanghj opened this issue · comments
yyyanghj commented
It works well if I remove --dts flag.
src/index.ts(1,25): error TS6307: File '~/tsup-demo/src/error.ts' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.
(node:96371) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'loc' of undefined
at handleError (~/tsup-demo/node_modules/.pnpm/tsup@5.12.2_typescript@4.6.3/node_modules/tsup/dist/chunk-36LV6M5D.js:175:13)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:96371) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:96371) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
DTS Build error
Error: Failed to compile. Check the logs above.
at error (~/tsup-demo/node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/shared/rollup.js:198:30)
at throwPluginError (~/tsup-demo/node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/shared/rollup.js:21847:12)
at Object.error (~/tsup-demo/node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/shared/rollup.js:22570:20)
at Object.error (~/tsup-demo/node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/shared/rollup.js:22024:42)
at Object.transform (~/tsup-demo/node_modules/.pnpm/tsup@5.12.2_typescript@4.6.3/node_modules/tsup/dist/rollup.js:8394:20)
at ~/tsup-demo/node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/shared/rollup.js:22779:37
EGOIST commented
Your project works fine if you remove "composite": true
from tsconfig.json
yyyanghj commented
Your project works fine if you remove
"composite": true
fromtsconfig.json
Thank you!