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

Diff2html fails with Error: Cannot find module 'tslib' #501

Closed
yonahd opened this issue Aug 7, 2023 · 0 comments · Fixed by #503
Closed

Diff2html fails with Error: Cannot find module 'tslib' #501

yonahd opened this issue Aug 7, 2023 · 0 comments · Fixed by #503

Comments

@yonahd
Copy link

yonahd commented Aug 7, 2023

Step 0: Describe your environment

  • OS: linux
  • diff2html version: 5.2.13

Step 1: Describe the problem:

Throws an error when running
diff2html -s side -F /file-diff.html -i file -- /comparison.diff

Steps to reproduce:

  1. install diff2html-cli
  2. run diff2html -s side -F /file-diff.html -i file -- /comparison.diff

Observed Results:


node:internal/modules/cjs/loader:1053
const err = new Error(message);
                ^
  
Error: Cannot find module 'tslib'
Require stack:
  - /usr/local/lib/node_modules/diff2html-cli/node_modules/diff2html/lib/diff2html.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1053:15)
      at Module._load (node:internal/modules/cjs/loader:898:27)
      at Module.require (node:internal/modules/cjs/loader:1120:19)
      at require (node:internal/modules/helpers:112:18)
      at Object.<anonymous> (/usr/local/lib/node_modules/diff2html-cli/node_modules/diff2html/lib/diff2html.js:4:17)
      at Module._compile (node:internal/modules/cjs/loader:1239:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1293:10)
      at Module.load (node:internal/modules/cjs/loader:1096:32)
      at Module._load (node:internal/modules/cjs/loader:935:12)
      at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/usr/local/lib/node_modules/diff2html-cli/node_modules/diff2html/lib/diff2html.js'
    ]
  }
  
  Node.js v19.4.0

Expected Results:

generate a diff file

Relevant Code:

diff2html -s side -F /file-diff.html -i file -- /comparison.diff
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