You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running `npm install` with the JupyterLab 2.0.0 dependencies resulted in
an error.
```
node_modules/@jupyterlab/ui-components/lib/icon/labicon.d.ts:3:8 - error TS1259: Module '"/home/erik/dev/contrib/jupyterhub/jupyter-server-proxy/jupyterlab-server-proxy/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag
3 import React from 'react';
~~~~~
node_modules/@types/react/index.d.ts:62:1
62 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
```
Adding an option that influenced the typechecking, but not the actual
execution, made it go away. I learned it from this stackoverflow answer.
https://stackoverflow.com/a/56348146/2220152
Note that the option `allowSyntheticDefaultImports` is described like
this, which makes me safe that we won't influence actual execution but
only the type checking part.
> Allow default imports from modules with no default export. This does not
affect code emit, just typechecking.
0 commit comments