ReactElement type error?
Opened this issue · 3 comments
lisp commented
when i follow the installation instructions, an error occurs in npm run build
:
$ npm run build
> cy-jupyterlab@0.6.0 build /Users/jamesanderson/jupyter/cy-jupyterlab
> tsc
node_modules/@types/react-transition-group/TransitionGroup.d.ts:16:30 - error TS2314: Generic type 'ReactElement<P>' requires 1 type argument(s).
16 childFactory?(child: ReactElement): ReactElement;
this, with core@4.5.0 and lab@1.0.2
lisp commented
i tried
npm install --save @types/react
which reported
+ @types/react@16.9.3
but the subsequent build failed further
(base) berlintoo:cy-jupyterlab jamesanderson$ npm run build
> cy-jupyterlab@0.6.0 build /Users/jamesanderson/jupyter/cy-jupyterlab
> tsc
node_modules/@jupyterlab/apputils/node_modules/@types/react/index.d.ts:2314:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
2314 type LibraryManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@jupyterlab/apputils/node_modules/@types/react/index.d.ts:2329:13 - error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.
2329 a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
~
...
lisp commented
appears to have been rectified by
yarn remove @types/react-dom @types/react
yarn add @types/react-dom @types/react
lisp commented
in the end, there appears to be a conflict between the library and the lab version
"cy-jupyterlab@0.6.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=1.0.1 <2.0.0 >=0.19.1 <0.20.0@jupyterlab/application
>=1.0.1 <2.0.0 >=0.19.1 <0.20.0@jupyterlab/apputils
>=3.0.0 <4.0.0 >=2.2.1 <3.0.0 @jupyterlab/coreutils