A problem in bun workspace

i’ve started the project (build ai powered app).
when i create a workspace with bun to handle both client and server from one node modules
bun creates seprate node modules for each package this is my main package.json

{

“name”: “ai-powered-app”,

“module”: “index.ts”,

“type”: “module”,

“private”: true,

“devDependencies”: {

“@types/bun”: “latest”

},

“workspaces”: [

“packages/*”

],

“peerDependencies”: {

“typescript”: “^5”

},

“dependencies”: {

“@types/express”: “^5.0.6”

}

}

i’ll be appreciated from your opinions.

Run bun install from the workspace root, where the package.json containing "workspaces" lives. If you installed from inside a package, remove its node_modules and any extra lockfile, then install again at the root. Each package should still list the dependencies it imports in its own package.json; Bun can hoist compatible versions to the root, but conflicting versions may need separate installs.