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
When the kysely.config.ts file contains top-level await or imports a file that has top-level await, and the package.json type field is set to module, running kysely migrate:make <migration name> errors-out with the following message
SyntaxError: await is only valid in async functions and the top level bodies of modules
In my case, this top-level await is used to fetch the database password from a secret manager.
When the kysely.config.ts file contains top-level await or imports a file that has top-level await, and the package.json
type
field is set tomodule
, runningkysely migrate:make <migration name>
errors-out with the following messageIn my case, this top-level await is used to fetch the database password from a secret manager.
Repro repository: https://github.com/DominicRoyStang/kysely-ctl-async-bug
The text was updated successfully, but these errors were encountered: