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

Node 14+ compatibility fix #297

Closed
wants to merge 3 commits into from
Closed

Node 14+ compatibility fix #297

wants to merge 3 commits into from

Conversation

Freezystem
Copy link

This PR fix errors related to npm package extract-file imports that no longer works with recent version of node (at least v18.x.x and v19.x.x).
It seems that extract-file npm package.json prevent node from importing directly from files within public directory.

Here is the errors I got:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/extractFiles' is not defined by "exports" in [...]/node_modules/extract-files/package.json

same goes for two other exports:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/isExtractableFile' is not defined by "exports" in [...]/node_modules/extract-files/package.json

and

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/ReactNativeFile' is not defined by "exports" in [...]/node_modules/extract-files/package.jsonx

As extract-file index.js exports these directly I've just updated the imports.

This PR fix errors related to npm package `extract-file` imports that no longer works with recent version of node (at least v18.x.x and v19.x.x).
It seems that `extract-file` npm package.json prevent node from importing directly from files within public directory.


Here is the errors I got:
> Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/extractFiles' is not defined by "exports" in [...]/node_modules/extract-files/package.json
same goes for two other exports:
> Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/isExtractableFile' is not defined by "exports" in [...]/node_modules/extract-files/package.json
and
> Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/ReactNativeFile' is not defined by "exports" in [...]/node_modules/extract-files/package.jsonx

As `extract-file` index.js exports these directly I've just updated the imports.
@jaydenseric
Copy link
Owner

Hi @Freezystem , thanks for you interest in contributing to the project :)

I had hoped to get to this PR today as it's a public holiday here in Victoria, Australia. Unfortunately I ran out of time after publishing https://github.com/jaydenseric/find-unused-exports/releases/tag/v5.0.0 .

Something to be aware of, is that there is a next branch I've been working on that's ahead of master:

https://github.com/jaydenseric/apollo-upload-client/commits/next

Work on it is paused until Apollo Client resolves this bug:

apollographql/apollo-client#9890 (comment)

@Freezystem Freezystem closed this Mar 2, 2023
@Freezystem Freezystem deleted the patch-1 branch March 2, 2023 15:17
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 this pull request may close these issues.

2 participants