Im making an app that uses Instantsearch-react-hooks. On the development server everything runs fine. But when i try to build the project bellow errors occure:
node_modules/@algolia/ui-components-highlight-vdom/dist/esm/Highlight.d.ts:10:13 - error TS2717: Subsequent property declarations must have the same type. Property 'span' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>', but here has type 'IntrinsicElement'.
10 span: IntrinsicElement;
~~~~
node_modules/@types/react/index.d.ts:3201:13
3201 span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
~~~~
'span' was also declared here.
node_modules/@algolia/ui-components-highlight-vdom/dist/esm/Highlight.d.ts:11:13 - error TS2717: Subsequent property declarations must have the same type. Property 'mark' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>', but here has type 'IntrinsicElement'.
11 mark: IntrinsicElement;
~~~~
node_modules/@types/react/index.d.ts:3171:13
3171 mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
~~~~
'mark' was also declared here.
node_modules/@algolia/ui-components-shared/dist/esm/Renderer.d.ts:8:13 - error TS2717: Subsequent property declarations must have the same type. Property 'children' must be of type '{}', but here has type 'ComponentChildren'.
8 children: ComponentChildren;
~~~~~~~~
node_modules/@types/react/index.d.ts:3093:46
3093 interface ElementChildrenAttribute { children: {}; }
~~~~~~~~
'children' was also declared here.
node_modules/react-router/dist/lib/polyfills/start-transition.d.ts:2:38 - error TS2339: Property 'startTransition' does not exist on type 'typeof React'.
2 declare const _default: typeof React.startTransition;
From this i understand that the types of span and mark are conflicting with those provided by react library.
For the steps i've taken. I updated the npm as well as node, but it didn't help. i also made
npm update
which did nothing as well. Tried updating react to the latest version but still nothing. I could probably change some code in the nodemodules but i want everything to work fine on every instalation becouse im using a netlify server which runs
npm run build
on every commit i make.