Skip to content

BUG: 'yarn run test:specs' command fails to load @markedjs/html-differ #3330

Closed

Description

@kiyoka

Description

The npm package '@markedjs/html-differ' was changed from CommonJS to ES Module at version 4.0.0.
Due to a bug in npm package 'esm', the
'@markedjs/html-differ' version 4.0.1 cannot be loaded.

markedjs/html-differ#144

  • Can you reproduce the issue?

Steps to reproduce

  1. git clone the marktext source code
  2. execute this command
yarn install
yarn run test:specs

Expected behavior:

yarn run test:specs command exits without error.
My personal opinion is that the version of @markedjs/html-differ should be reverted back to 3.0.x.

Actual behavior:

PS C:\Users\kiyoka\source\repos\marktext> yarn run test:specs
yarn run v1.22.19
$ node -r esm test/specs/commonMark/run.spec.js && node -r esm test/specs/gfm/run.spec.js
C:\Users\kiyoka\source\repos\marktext\node_modules\esm\esm.js:1
 .
 .
 .
C:\Users\kiyoka\source\repos\marktext\test\specs\commonMark\run.spec.js:1
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\kiyoka\source\repos\marktext\node_modules\@markedjs\html-differ\lib\index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (C:\Users\kiyoka\source\repos\marktext\test\specs\commonMark\run.spec.js:7:20)
    at Generator.next (<anonymous>) {
  code: 'ERR_REQUIRE_ESM'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\Users\kiyoka\source\repos\marktext>

Versions

  • MarkText version: 0.17.1
  • Operating system: all platform
  • NodeJS: 16.15.0

Activity

  1. added
    🐛 bug
    🪲 pri/major
    on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions