Closed giltayar closed 2 years ago
No, your not. Got the same problem. Maybe it is just because the release is very young so nobody else had this error before. In the earlier Version 0.3.38 I only find the dependency of mdast-util-from-markdown
but I cannot find any usage. In the newer Version (which I cannot find here on github) there is a require('mdast-util-from-markdown')
which results in this issue.
So for a workaround, I would downgrade to 0.3.38 until this is fixed.
Fixed: v0.4.2
Works! Thanks!
While upgrading to the latest version of this plugin (
0.4.1
), ESlint failed me because this plugin'sdist/index.js
wasrequire
-ing a package that was ESM-only (mdast-util-from-markdown
).I looked in this repo, and found that there was supposed to be a workaround to fix this (by rolling up everything into CJS): https://github.com/hosseinmd/prettier-plugin-jsdoc/commit/28ac56e0eeaaf9d5f6e6170f8d8979c0d758840b.
But it looks like it doesn't work, because
dist/index.js
is stillrequire
-ing that ESM-only package.To make sure, I cloned this repo, and ran
yarn
. This should have created a rolled-updist/index.js
, but did not. To make sure, I opened a CLI, and didrequire('./dist/index.js')
, and got an ESM error, as I expected it should. So the current code in the repo also doesn't solve the ESM error.I don't see how I'm the only one with this problem, so what am I missing?