Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
kiyoka opened this issue Jun 26, 2022 · 0 comments · Fixed by #3331
Closed
1 task done

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

kiyoka opened this issue Jun 26, 2022 · 0 comments · Fixed by #3331

Comments

@kiyoka
Copy link
Contributor

kiyoka commented Jun 26, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant