Type 'import("/home/enoch/REPOS/work_space/IC-Puzzle/node_modules/@dfinity/candid/lib/cjs/idl").InterfaceFactory' is not assignable to type 'import("/home/enoch/REPOS/work_space/IC-Puzzle/node_modules/@connect2ic/core/node_modules/@dfinity/candid/lib/cjs/idl").InterfaceFactory'.
Types of parameters 'idl' and 'idl' are incompatible.
Type '{ IDL: { Empty: import("/home/enoch/REPOS/work_space/IC-Puzzle/node_modules/@connect2ic/core/node_modules/@dfinity/candid/lib/cjs/idl").EmptyClass; Reserved: import("/home/enoch/REPOS/work_space/IC-Puzzle/node_modules/@connect2ic/core/node_modules/@dfinity/candid/lib/cjs/idl").ReservedClass; ... 24 more ...; Service...' is not assignable to type '{ IDL: { Empty: import("/home/enoch/REPOS/work_space/IC-Puzzle/node_modules/@dfinity/candid/lib/cjs/idl").EmptyClass; Reserved: import("/home/enoch/REPOS/work_space/IC-
And at “providers” I am getting this:
Type '(config: Config) => Provider[]' is not assignable to type 'IConnector[] | ((config: Config) => IConnector[])'.
Type '(config: Config) => Provider[]' is not assignable to type '(config: Config) => IConnector[]'.
Types of parameters 'config' and 'config' are incompatible.
Type 'Config' is not assignable to type 'Config'. Two different types with this name exist, but they are unrelated.
Types of property 'whitelist' are incompatible.
Type 'string[] | undefined' is not assignable to type 'string[]'.
Type 'undefined' is not assignable to type 'string[]'.ts(2322)
_app.tsx(83, 16): Did you mean to call this expression?
How can I fix this? I am using nextjs with Typescript.
Here’s a snippet of my package.json to overcome the candid version incompatibilities. You’ll likely need to clear your node_modules and clear your npm cache, then run npm install.