Closed kulsumansari closed 2 years ago
If through
is a CommonJS module, it seems you are using an old version.
The version of unified
in react-markdown
is 10+: https://github.com/remarkjs/react-markdown/blob/main/package.json#L94.
The first version of unified in the 10+ line includes through
2+: https://github.com/unifiedjs/unified/blame/3d504623341ccd9cea19bc2a14c0cf2b28254088/package.json#L54.
The first version of through in the 2+ line is ESM-only: https://github.com/wooorm/trough/blame/6db47a437b4cf73ba75a8214766e1bff49eb951d/package.json#L21.
Updating your dependencies, throwing away package locks and node_modules
, should do the trick.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Initial checklist
Affected packages and versions
react-markdown@8.0.3
Link to runnable example
react-markdown version 8.0.3
Steps to reproduce
I am using react-markdown version 8.0.3 on next.js 12 application . on creating build on server I am getting following error :
I fixed this temporarily bt degrading react-markdown version to 7.1.2 the error seems to resolve.
Expected behavior
Build should be created successfully.
Actual behavior
Build should be created successfully.
Runtime
Node v16
Package manager
npm 8
OS
Linux
Build and bundle tools
Webpack, Next.js