← All tasks
javascriptkpdecker/jsdiff #350Not a task: not reproduced

Can't import files in `lib/`

envgap__kpdecker__jsdiff-350

01 / FAILURE SIGNATURE

As reported upstream

Since Node.js 17, `require("diff/lib/patch/create.js")` throws an error.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
d358a573dc38fb89dd5ee296805e29f75c932a58
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

kpdecker/jsdiff #350 · read the original issue
Since Node.js 17, `require("diff/lib/patch/create.js")` throws an error.



```text

node:internal/modules/cjs/loader:488

      throw e;

      ^



Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/patch/create.js' is not defined by "exports" in <CWD>\node_modules\diff\package.json

```



There is also a warning when doing this on Node.js 16



```text

(node:16332) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at <CWD>\node_modules\diff\package.json.

Update this package.json to use a subpath pattern like "./*".

(Use `node --trace-deprecation ...` to show where the warning was created)

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]