You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib' is not defined by "exports" in /myapp/node_modules/headers-polyfill/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:464:9)
at packageExportsResolve (node:internal/modules/esm/resolve:748:3)
at resolveExports (node:internal/modules/cjs/loader:493:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:533:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/myapp/node_modules/msw/lib/node/index.js:658:18) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Use import ... from "headers-polyfill" instead of headers-polyfill/lib in
Prerequisites
Environment check
msw
versionNode.js version
v16
Reproduction repository
Reproduction steps
Current behavior
Use
import ... from "headers-polyfill"
instead ofheaders-polyfill/lib
in[src/utils/request/MockedRequest.ts](https://github.com/mswjs/msw/blob/6c6e1193327ba6c7d55826fd7997ddc9f1fb4fd5/src/utils/request/MockedRequest.ts)
[src/utils/request/MockedRequest.test.ts](https://github.com/mswjs/msw/blob/fc7f00c96e79ad0be83cbaf7c82ceff23f0c4355/src/utils/request/MockedRequest.test.ts)
[src/handlers/GraphQLHandler.test.ts](https://github.com/mswjs/msw/blob/fc7f00c96e79ad0be83cbaf7c82ceff23f0c4355/src/handlers/GraphQLHandler.test.ts)
Expected behavior
No error
The text was updated successfully, but these errors were encountered: