HackPlan / UUI

Universal Utility-first UI Library

Home Page:https://doc.uui.cool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure when use typescript in Next.JS: Type error: Declaration or statement expected.

u-u-z opened this issue · comments

yarn run v1.22.5
$ next build
Failed to compile.

./node_modules/@hackplan/uui/lib/index.d.ts:37:1
Type error: Declaration or statement expected.

  35 |  */
  36 | export { UUI } from './core/uui';
> 37 | export type { UUIClassComponentProps, UUIFunctionComponentProps, UUIComponentCustomizeProps } from './core/uui';
     | ^
  38 | /**
  39 |  * Styles
  40 |  */
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@shincurry told me need update typescript version.
cuz, export type support need new version.
My ts is 3.7.3 , then I update it to 4.0.2
Finally, it works! 🎉🎉🎉