For instance, say I'm in the parent folder of app
folder where package.json
is, and I want to install dependencies for app
without cd
into it.
I tried:
bun --prefix app install # the npm way
bun --dir app install # the pnpm way
bun --cwd app install # the bun way, but only works with `run` scripts like `bun start`
None of the above worked. Is it supported at all?
If the directory structure is
parent > app > package.json
and you are currently inparent
, you can install all dependencies with this command:If you need to install a new dependency, for example
react
, you can use this command:This command will also create a
package.json
file if not present.