From d69eb3ca00af95fb5a9c500af1cc214f15eaa17c Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 1 Sep 2025 01:10:22 -0700 Subject: [PATCH] update outdated doc --- docs/cli/bun-install.md | 5 ++--- docs/install/cache.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/cli/bun-install.md b/docs/cli/bun-install.md index 72aaba283e..fba186e6c9 100644 --- a/docs/cli/bun-install.md +++ b/docs/cli/bun-install.md @@ -230,16 +230,15 @@ $ bun install --backend copyfile **`symlink`** is typically only used for `file:` dependencies (and eventually `link:`) internally. To prevent infinite loops, it skips symlinking the `node_modules` folder. -If you install with `--backend=symlink`, Node.js won't resolve node_modules of dependencies unless each dependency has its own node_modules folder or you pass `--preserve-symlinks` to `node`. See [Node.js documentation on `--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks). +If you install with `--backend=symlink`, Node.js won't resolve node_modules of dependencies unless each dependency has its own node_modules folder or you pass `--preserve-symlinks` to `node` or `bun`. See [Node.js documentation on `--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks). ```bash $ rm -rf node_modules $ bun install --backend symlink +$ bun --preserve-symlinks ./my-file.js $ node --preserve-symlinks ./my-file.js # https://nodejs.org/api/cli.html#--preserve-symlinks ``` -Bun's runtime does not currently expose an equivalent of `--preserve-symlinks`, though the code for it does exist. - ## npm registry metadata bun uses a binary format for caching NPM registry responses. This loads much faster than JSON and tends to be smaller on disk. diff --git a/docs/install/cache.md b/docs/install/cache.md index f1e84d4cea..8f5336c476 100644 --- a/docs/install/cache.md +++ b/docs/install/cache.md @@ -48,12 +48,12 @@ This behavior is configurable with the `--backend` flag, which is respected by a - **`copyfile`**: The fallback used when any of the above fail. It is the slowest option. On macOS, it uses `fcopyfile()`; on Linux it uses `copy_file_range()`. - **`symlink`**: Currently used only `file:` (and eventually `link:`) dependencies. To prevent infinite loops, it skips symlinking the `node_modules` folder. -If you install with `--backend=symlink`, Node.js won't resolve node_modules of dependencies unless each dependency has its own `node_modules` folder or you pass `--preserve-symlinks` to `node`. See [Node.js documentation on `--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks). +If you install with `--backend=symlink`, Node.js won't resolve node_modules of dependencies unless each dependency has its own `node_modules` folder or you pass `--preserve-symlinks` to `node` or `bun`. See [Node.js documentation on `--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks). ```bash $ bun install --backend symlink $ node --preserve-symlinks ./foo.js +$ bun --preserve-symlinks ./foo.js ``` -Bun's runtime does not currently expose an equivalent of `--preserve-symlinks`. {% /details %}