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
Node.js versions between 13.0.0 and 13.6.0 still had larger bugs in their ESM implementations and the esm wrapper breaks requiring koa the regular way on those runtimes.
❯ node
Welcome to Node.js v13.0.0.
Type ".help" for more information.
> require('koa')
Thrown:
Error: Package exports for '/Users/panva/repo/provider/node_modules/koa' do not define a valid '.' target
at resolveExportsTarget (internal/modules/cjs/loader.js:455:13)
at resolveExports (internal/modules/cjs/loader.js:388:16)
at Function.Module._findPath (internal/modules/cjs/loader.js:487:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:782:27)
at Function.Module._load (internal/modules/cjs/loader.js:688:27)
at Module.require (internal/modules/cjs/loader.js:850:19)
at require (internal/modules/cjs/helpers.js:74:18) {
code: 'MODULE_NOT_FOUND'
}
>
❯ node
Welcome to Node.js v13.6.0.
Type ".help" for more information.
> require('koa')
Uncaught:
Error: No valid exports main found for '/Users/panva/repo/provider/node_modules/koa'
at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
at applyExports (internal/modules/cjs/loader.js:502:14)
at resolveExports (internal/modules/cjs/loader.js:551:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
at Function.Module._load (internal/modules/cjs/loader.js:855:27)
at Module.require (internal/modules/cjs/loader.js:1033:19)
at require (internal/modules/cjs/helpers.js:72:18) {
code: 'MODULE_NOT_FOUND'
}
I've ran into this in the past and know that for those node versions this is an unfixable problem so I don't have a suggestion for a way forward, just wanted to let you know.
For me this means changing my CI test matrix to test "low 13" with 13.7.0 instead 13.0.0 and have my fingers crossed.
I'd appreciate this breaking change be rolled back but as 13.x isn't a supported node release line, i understand if you won't. At the same time, the package.json engines no longer holds true and updating it is technically a breaking change too.
Unfortunately, if there is no way to fix these problematic node versions, even if we roll back the change, there will still be problems the next time we add this support.
Node.js versions between 13.0.0 and 13.6.0 still had larger bugs in their ESM implementations and the esm wrapper breaks requiring
koa
the regular way on those runtimes.I've ran into this in the past and know that for those node versions this is an unfixable problem so I don't have a suggestion for a way forward, just wanted to let you know.
For me this means changing my CI test matrix to test "low 13" with 13.7.0 instead 13.0.0 and have my fingers crossed.
This was merged in #1474
The text was updated successfully, but these errors were encountered: