windmill-react-ui icon indicating copy to clipboard operation
windmill-react-ui copied to clipboard

Type error: Cannot find name 'Mode'.

Open andregamma opened this issue 4 years ago • 2 comments

  • windmill-react-ui version: 0.4.1

What you did:

Updated Windmill to the lastest version (with Typescript)

What happened:

I'm deploying my NextJS project on Vercel and I'm receiving an error on build that says Type error: Cannot find name 'Mode'. Seems that the index.d.ts from types folder is not loading on my project or something like that, (sorry if I'm wrong, I started to use Typescript not a long time ago). My Visual Studio Code shows the following message on @windmill/react-ui import:

Could not find a declaration file for module '@windmill/react-ui'. 'c:/Users/toeof/Documents/React Projects/repair-service/frontend-next/node_modules/@windmill/react-ui/dist/index.js' implicitly has an 'any' type. Try npm install @types/windmill__react-ui if it exists or add a new declaration (.d.ts) file containing declare module '@windmill/react-ui';

Error on Vercel: image

andregamma avatar Nov 11 '20 17:11 andregamma

I also encountered the same problem

cgc2109748 avatar Nov 15 '21 06:11 cgc2109748

I had to temporarily add a custom type Mode in typings to make it work.

type Mode = string | null;

sumgwork avatar Dec 11 '21 22:12 sumgwork