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
By default the module loader loads all submodules in an exports field of a package.json file.
But some packages can have optional peer dependencies, and some of their submodules can use different optional dependencies.
For postgres you only need submodules drizzle-orm/node-postgres and drizzle-orm/pg-core that require the pg package.
But the loader is trying to load all submodules, and the first of them uses an optional @aws-sdk/client-rds-data dependency, which is of course not installed if you plan to use only postgres, and it crashes.
> node server.js
21:09:12 W1 error Can not load modules: drizzle-orm
21:09:12 W0 info Can not start Application server
ELIFECYCLE Command failed with exit code 1.
Additional context
The issue is not about the drizzle-orm itself or any other orm.
Some other packages may also use this pattern.
The text was updated successfully, but these errors were encountered:
Describe the bug
By default the module loader loads all submodules in an
exports
field of apackage.json
file.But some packages can have optional peer dependencies, and some of their submodules can use different optional dependencies.
For example drizzle-orm.
package.json
Object.keys(pkg.exports)
For postgres you only need submodules
drizzle-orm/node-postgres
anddrizzle-orm/pg-core
that require thepg
package.But the loader is trying to load all submodules, and the first of them uses an optional
@aws-sdk/client-rds-data
dependency, which is of course not installed if you plan to use only postgres, and it crashes.impress/lib/deps.js
Lines 50 to 61 in 4cabe81
To Reproduce
npm i [email protected]
npm start
Additional context
The issue is not about the
drizzle-orm
itself or any other orm.Some other packages may also use this pattern.
The text was updated successfully, but these errors were encountered: