Skip to content

diff2html appears not to work with node 22 #14

@bennypowers

Description

@bennypowers

Thank you for publishing this package, it looks like exactly what I need to test that tooling updates don't break my packages. Today I tried running it on one of my project and found that diff2html could not cope.

Here is the relevant output:

❯ npx pkdiff ./rhds-tokens-2.0.1.tgz @rhds/tokens@2.0.0
Need to install the following packages:
pkdiff@2.0.1
Ok to proceed? (y) y

npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated highlight.js@9.17.1: Version no longer supported. Upgrade to @latest
@rhds/tokens@2.0.0: downloading...
@rhds/tokens@2.0.0: done: 419.05ms
comparing file structure...
unpacked to /tmp/package-diff-563285805/unpackvsgGvZ
unpacked to /tmp/package-diff-563285805/unpackBKYtdW
diffing content...
diffing content - done: 3.692ms
Packages are different
node:fs:561
  return binding.open(
                 ^

Error: ENOENT: no such file or directory, open '/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/node_modules/diff2html/bundles/css/diff2html.min.css'
    at Object.openSync (node:fs:561:18)
    at Object.readFileSync (node:fs:445:35)
    at outHtml (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/utils.js:39:22)
    at formatOutput (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/utils.js:95:16)
    at Command.<anonymous> (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/cli.js:81:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/node_modules/diff2html/bundles/css/diff2html.min.css'
}

Node.js v22.6.0

red-hat-design-tokens on  chore/sdv4 [$?] is 📦 v2.0.1 via  v22.6.0 took 10s 
❯ npx diff2html
npm error could not determine executable to run
npm error A complete log of this run can be found in: /home/xxxx/.npm/_logs/2024-08-29T07_31_57_339Z-debug-0.log

red-hat-design-tokens on  chore/sdv4 [$?] is 📦 v2.0.1 via  v22.6.0 
❯ npm i -g diff2html
npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

added 7 packages in 968ms

red-hat-design-tokens on  chore/sdv4 [$?] is 📦 v2.0.1 via  v22.6.0 
❯ npx pkdiff ./rhds-tokens-2.0.1.tgz @rhds/tokens@2.0.0
@rhds/tokens@2.0.0: downloading...
@rhds/tokens@2.0.0: done: 408.537ms
comparing file structure...
unpacked to /tmp/package-diff-563285805/unpackzj1mRs
unpacked to /tmp/package-diff-563285805/unpacksIGF8Z
diffing content...
diffing content - done: 2.777ms
Packages are different
Failed to parse lines, starting in 0!
Failed to parse lines, starting in 0!
Failed to parse lines, starting in 0!
Failed to parse lines, starting in 0!
Failed to parse lines, starting in 0!
node:fs:561
  return binding.open(
                 ^

Error: ENOENT: no such file or directory, open '/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/node_modules/diff2html/bundles/css/diff2html.min.css'
    at Object.openSync (node:fs:561:18)
    at Object.readFileSync (node:fs:445:35)
    at outHtml (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/utils.js:39:22)
    at formatOutput (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/utils.js:95:16)
    at Command.<anonymous> (/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/src/cli.js:81:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/xxxx/.npm/_npx/93b7d9456cbbd1e8/node_modules/pkdiff/node_modules/diff2html/bundles/css/diff2html.min.css'
}

Node.js v22.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions