I'm experiencing several TypeScript compilation errors during my Vite build process. The errors seem to originate from the type declarations in my node_modules.
Here are some of the errors:
node_modules/@rainbow-me/rainbowkit/dist/wallets/connectorsForWallets.d.ts:2:78 - error TS2304: Cannot find name 'Connector'.
2 export declare const connectorsForWallets: (walletList: WalletList) => () => Connector[];
node_modules/@web3modal/core/dist/_types/src/controllers/ClientCtrl.d.ts:5:22 - error TS2307: Cannot find module '@web3modal/ethereum' or its corresponding type declarations.
5 client(): import("@web3modal/ethereum").EthereumClient;
~~~~~~~~~~~~~~~~~~~~~
node_modules/viem/dist/types/clients/transports/webSocket.d.ts:2:15 - error TS2595: 'WebSocket' can only be imported by using a default import.
2 import type { WebSocket } from 'isomorphic-ws';
My tsconfig.json looks like this:
{
"compilerOptions": {
"outDir": "dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "es6",
"target": "es2015",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"include": [
"src/**/*"
]
}
I have already made sure to import all necessary dependencies, and yet the errors persist. Is there a way to build the project without ignoring library checks?