Minimal reproduction for iamhosseindhv/notistack#485
- Install dependencies using
yarn
(my version is1.22.17
)
yarn install
- Run type checking
yarn run type-check
- An error should appear
src/main.tsx:8:6 - error TS2786: 'SnackbarProvider' cannot be used as a JSX component.
Its instance type 'SnackbarProvider' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("/Users/bartoszlegiec/Projects/notistack-issue-485/node_modules/@types/react-transition-group/node_modules/@types/react/index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.
8 <SnackbarProvider>
~~~~~~~~~~~~~~~~
The issues doesn't seem to be happening when using npm
-
Head to the
npm
branch -
Remove old
node_modules
rm -rf node_modules
- Install dependencies
npm install
- Run type checking
npm run type-check
- It should go through successfully, without any errors