Skip to content

Bun install package in NFS #4442

Closed
Closed

Description

@junmediatek

Description

When I use opencode on NFS, bun install has hardlink/symlink-related filesystem compatibility issues, which causes some packages to fail to install correctly, resulting in opencode not functioning properly.

You can modify below code to resolve this issue.

modify bunfig.toml as below
[install]
exact = true
backend = "copyfile"

modify packages/opencode/src/bun/index.ts as below
const args = ["add", "--force", "--exact", "--backend=copyfile", "--cwd", Global.Path.cache, pkg + "@" + version]

OpenCode version

latest

Steps to reproduce

  1. use opencode in the NFS

Screenshot and/or share link

Operating System

ubuntu 24

Terminal

VScode remoteSSH

Could you fix this issue?

Activity

  1. junmediatek commented on Nov 18, 2025

    @junmediatek
    ContributorAuthor

    @thdxr Could you check this issue?

  2. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Contributor

    yeah we can look into this for u

  3. self-assigned this
    on Nov 18, 2025
  4. junmediatek commented on Nov 20, 2025

    @junmediatek
    ContributorAuthor

    hi @rekram1-node

    below patch maybe fix this issue, could you review it?

    index_patch.ts

  5. rekram1-node commented on Nov 21, 2025

    @rekram1-node
    Contributor

    hm I think that should work, can u open pr

  6. junmediatek commented on Nov 24, 2025

    @junmediatek
    ContributorAuthor

    Hi @rekram1-node

    The pr link is : #4674
    Could you help to review it?

  7. junmediatek commented on Nov 25, 2025

    @junmediatek
    ContributorAuthor

    @rekram1-node

    Can you check the pr: #4674 ?

  8. yinengy commented on Jan 15, 2026

    @yinengy

    I have the same issue. My opencode keep failing with BunInstallFailedError on a NFS server.

    With the following error messages found in log

    FileNotFound: failed copying files from cache to destination for package mime-types
    <similiar error for other packages>
    

    My workaround is moving BUN's global cache to local storage by

    export BUN_INSTALL_CACHE_DIR="<a local storage location instead of NFS>"
    

    If it doesn't work, also move your opencode config and cache directory to local storage and make a soft link to your home

    # Create the symlinks
    ln -s <local storage>/opencode/cache ~/.cache/opencode
    ln -s <local storage>/opencode/config ~/.config/opencode
    
  9. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions