Hi, I’m Dung Huynh Duc . Nice to meet you.

About Me

With over a decade of experience under my belt as a full-stack developer, I've had the opportunity to spearhead project teams at tech startups in Vietnam, Thailand, Japan and Singapore. Additionally, I have worked as a freelance engineer for various companies based in Asia Pacific, Europe, and North America.

Presently, I serve the role of a Senior Full Stack Software Engineer at ACX. I am consistently committed to exploring and acquiring knowledge on emerging and popular technologies.

cli
oclif
tsup

#TIL 31 - Fix build error on oclif CLI for Typescript 4.8.3

blog_hero_#TIL 31 - Fix build error on oclif CLI for Typescript 4.8.3

I ran into an issue with TS 4.8.3 for oclif.

shx rm -rf dist && tsc -b

node_modules/@oclif/core/lib/command.d.ts:100:35 - error TS2344: Type 'F' does not satisfy the constraint 'FlagOutput'.

Fixed by use [tsup](https://tsup.egoist.dev/) instead of `tsc`

Step 1: change the build command on package.json

from

"build": "shx rm -rf dist && tsc -b",

to

 "build": "shx rm -rf dist && tsup",

Step 2: add tsup config file, e.g: tsup.config.json

{

  "entry": ["src/**/*.ts"],

  "splitting": false,

  "sourcemap": true,

  "clean": true

}