TypeScript error: File ‘types/*.ts’ not found

I am facing the below error when running npm ci. Can anyone help me to resolve this?

$ npm ci

> prepare
> (is-ci || husky install) && conc "npm:prepare:*"

husky - Git hooks installed
[ts]
[ts] > prepare:ts
[ts] > npm run types -- --lang typescript --out ts/packages/ts/src/types/generated.ts --prefer-unions
[ts]
[ts]
[ts] > types
[ts] > quicktype --src-lang typescript --src ./types/*.ts --lang typescript --out ts/packages/ts/src/types/generated.ts --prefer-unions
[ts]
[ts] Error: TypeScript error: File 'types/*.ts' not found.
[ts]   The file is in the program because:
[ts]     Root file specified for compilation.
[ts] npm run prepare:ts exited with code 1
npm ERR! code 1
npm ERR! path C:\Users\lenovo\Opensource\Contributions\<repo_name>
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (is-ci || husky install) && conc "npm:prepare:*"

npm ERR! A complete log of this run can be found in: C:\Users\lenovo\AppData\Local\npm-cache\_logs\2024-02-10T06_33_13_617Z-debug-0.log

Leave a Comment