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

Can't import files in lib/ #350

Closed
fisker opened this issue Feb 14, 2022 · 0 comments · Fixed by #351
Closed

Can't import files in lib/ #350

fisker opened this issue Feb 14, 2022 · 0 comments · Fixed by #351

Comments

@fisker
Copy link
Contributor

fisker commented Feb 14, 2022

Since Node.js 17, require("diff/lib/patch/create.js") throws an error.

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

(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)
@fisker fisker changed the title Can't import files in lib Can't import files in lib/ Feb 14, 2022
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