-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workspace inter-dependencies not found during build #16977
Comments
I can confirm this. It is very weird as can resolve in A simple command I used: bun --print "require.resolve('@sockethub/activity-streams')" |
Update, removing My theory is that it is being relative to where the cwd/main (I don't think you need the tsconfig to map your imports anyway as TS should be smart enough to read it from node_modules - at least if you add types field with the path passed to it) |
Is it possible just the import needs to be changed to reflect - import { ASFactory, type ASManager } from "@sockethub/activity-streams";
+ import { ASFactory, type ASManager } from "@sockethub/activity-streams/dist/activity-streams.js"; Or update exports in "exports": {
- "./dist/activity-streams.js": "./dist/activity-streams.js"
+ ".": "./dist/activity-streams.js"
} |
Another update, it appears removing My new theory is if there is exports, then it doesn't check |
By default, the import should use the typescript file, and only if you explicitly need the JS version you can include it. That's what I was going for with that exports definition. I've removed it for now, will revisit that once I get bun working in this branch. |
Just to confirm, removing the |
What version of Bun is running?
1.2.2+c1708ea6a
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
Using workspaces:
I have a package which depends on another package:
@sockethub/client
depends on@sockethub/activity-streams
In the
package/sockethub-client/package.json
:However, when trying to build, the dependency is not found.
Running
bun install
does not fix the issue.What is the expected behavior?
The package dependency should be found in the workspace.
What do you see instead?
Additional information
The repo can be accessed here (
switch-to-bun
branch):https://github.com/sockethub/sockethub/tree/switch-to-bun
The text was updated successfully, but these errors were encountered: