Both openworkflow and @openworkflow/backend-postgres have package.json files with a development export condition pointing to ./index.ts:
"exports": {
".": {
"development": "./index.ts",
"default": "./dist/index.js"
}
}
but only the dist folder is published to npm (per "files": ["dist"]), so the index.ts file doesn't exist in the installed package. When Vite tries to resolve the package in development mode, it just fails with:
Error: Failed to resolve entry for package "openworkflow" ...
Solution:
Either remove the "development" export condition from both packages, or include the source files in the published packages.
Workaround:
I currently have a janky postinstall script that removes the development export to make it work :) Wanted to open an issue before submitting a PR.