Blazej Owczarczyk
Results
3
comments of
Blazej Owczarczyk
The error is there for webpack as well. I've tried adding `"type": "module"` to package.json but that causes other errors.
Steps to reproduce: - `yarn create next-app` - `cd my-app` - `yarn add lightweight-charts` - `yarn dev # it works` - add `import { createChart } from 'lightweight-charts';` to pages/index.js...
Ok, this can be worked around with a [dynamic import](https://nextjs.org/docs/advanced-features/dynamic-import) in next. As mentioned by @NekitCorp [here](https://github.com/tradingview/lightweight-charts/issues/446#issuecomment-645262415) libraries don't usually throw fatal errors when they're imported in the SSR context,...