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
First, thanks for this great, yet simple library! I have been using it for some time and love how it 'just works' ❤️
I'm using ts-migrate-mongoose in programmatic mode (as described here), and starting from v3.8.4 I had an exception when trying to execute it:
node:internal/modules/run_main:123
triggerUncaughtException(
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './register' is not defined by "exports" in /my-project/node_modules/@swc-node/register/package.json imported from /my-project/node_modules/ts-migrate-mongoose/dist/esm/migrator.js
at exportsNotFound (node:internal/modules/esm/resolve:296:10)
at packageExportsResolve (node:internal/modules/esm/resolve:586:13)
at packageResolve (node:internal/modules/esm/resolve:822:14)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at nextResolve (node:internal/modules/esm/hooks:748:28)
at resolveBase (file:///my-project/node_modules/tsx/dist/esm/index.mjs?1733557026686:2:3212)
at resolveDirectory (file:///my-project/node_modules/tsx/dist/esm/index.mjs?1733557026686:2:3584)
at resolveTsPaths (file:///my-project/node_modules/tsx/dist/esm/index.mjs?1733557026686:2:4073)
at resolve (file:///my-project/node_modules/tsx/dist/esm/index.mjs?1733557026686:2:4447) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v22.8.0
Hello @antonplagemann thanks for the kind words, glad to hear that you found my packager useful, checked release notes looks like the issue you describing caused by switching to new swc register package. Strangely automated units did not catch this case, can you provide a sample repo with minimal setup where the case is reproducible?
First, thanks for this great, yet simple library! I have been using it for some time and love how it 'just works' ❤️
I'm using
ts-migrate-mongoose
in programmatic mode (as described here), and starting from v3.8.4 I had an exception when trying to execute it:I found it was caused by the following lines:
ts-migrate-mongoose/src/migrator.ts
Lines 19 to 20 in 386eb93
I could fix it changing it as follows:
If you can include this (or another fix) for the issue in the package that would be nice, so I can remove my patch file 😃 🙌
The text was updated successfully, but these errors were encountered: