Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Created January 31, 2023 09:24
Show Gist options
  • Save rkaneko/da053458c59f200abd3b94c3bef8eaaa to your computer and use it in GitHub Desktop.
Save rkaneko/da053458c59f200abd3b94c3bef8eaaa to your computer and use it in GitHub Desktop.
remark-gfm issue for mdast-util-find-and-replace by CommonJS module which may not support all module.exports as named exports
$ npm list mdast-util-find-and-replace
[email protected] /home/rkaneko/workspace/axelglobe/docs.axelglobe.com
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected]
SyntaxError: Named export 'convert' not found. The requested module 'unist-util-is' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'unist-util-is';
const {convert} = pkg;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment