windmill-react-ui
windmill-react-ui copied to clipboard
Type error: Cannot find name 'Mode'.
-
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 containingdeclare module '@windmill/react-ui';
Error on Vercel:
I also encountered the same problem
I had to temporarily add a custom type Mode in typings to make it work.
type Mode = string | null;