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

[ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/defaults' is not defined by "exports" #5183

Open
msalimbene opened this issue Oct 26, 2022 · 3 comments

Comments

@msalimbene
Copy link

Describe the bug

I started experiencing the following error when updating axios from 0.27.2 to 1.1.3. If I roll back it, the issue dissappears.

Is this a known issue?

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/defaults' is not defined by "exports" in /Users/salimbene/dev/hlp-api/node_modules/axios/package.json [0] at new NodeError (node:internal/errors:372:5) [0] at throwExportsNotFound (node:internal/modules/esm/resolve:472:9) [0] at packageExportsResolve (node:internal/modules/esm/resolve:753:3) [0] at resolveExports (node:internal/modules/cjs/loader:482:36) [0] at Function.Module._findPath (node:internal/modules/cjs/loader:522:31) [0] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27) [0] at Function.Module._load (node:internal/modules/cjs/loader:778:27) [0] at Module.require (node:internal/modules/cjs/loader:1005:19) [0] at require (node:internal/modules/cjs/helpers:102:18) [0] at Object. (/Users/salimbene/dev/hlp-api/node_modules/axios-cookiejar-support/lib/index.js:8:40) { [0] code: 'ERR_PACKAGE_PATH_NOT_EXPORTED

To Reproduce

Upgrade from 0.27.2 to 1.1.3

Code snippet

No response

Expected behavior

Nothing. I didn't change anything in the code. Only updated axios version.

Axios Version

1.1.3

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

v16.16.0

OS

13.0

Additional Library Versions

No response

Additional context/Screenshots

No response

@daniil4udo
Copy link

Related #5072

@evenfrost
Copy link

evenfrost commented Apr 16, 2024

For me, the problem was with the old version of axios-cookiejar-support, which was used by another package.
I fixed it by simply installing the latest version of the package:

npm i axios-cookiejar-support

@ms4ever7
Copy link

ms4ever7 commented Apr 25, 2024

Similar issue here: #5189 (comment)

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

No branches or pull requests

4 participants