Issue cause: The @codebuff/sdk@0.9.1 package internally uses the deprecated fs.exists() method, which is no longer available in Node.js v22.18.0.
Solution: I used pnpm's patch feature to fix this issue:
Create a patch: Used pnpm patch @codebuff/sdk@0.9.1 to create an editable copy.
Fix the code: Replaced all fs4.exists() calls with fs4.access():
Line 41054 (parseGitignore function)
Line 61485 (applyChanges function)
C:\Users\admin>node -v
v22.18.0
C:\Users\admin>
// node_modules\pnpm_patches\@codebuff\sdk@0.9.1\dist\index.mjs
// // raw
// if (!await fs4.exists(ignoreFilePath))
// continue;
// // fix
// try {
// await fs4.access(ignoreFilePath);
// } catch {
// continue;
// }