biomejs/biome · error · io::Error

memory FS doesn't support symlinks

Error message

memory FS doesn't support symlinks

What it means

Error "memory FS doesn't support symlinks" thrown in biomejs/biome.

Source

Thrown at crates/biome_fs/src/fs/memory.rs:249

        let mut cb_guard = cb_arc.lock();

        let cb = cb_guard.take().unwrap();

        Ok(cb())
    }

    fn get_staged_files(&self) -> io::Result<Vec<String>> {
        let cb_arc = self.on_get_staged_files.as_ref().unwrap().clone();

        let mut cb_guard = cb_arc.lock();

        let cb = cb_guard.take().unwrap();

        Ok(cb())
    }

    fn read_link(&self, _path: &Utf8Path) -> io::Result<Utf8PathBuf> {
        Err(io::Error::new(
            io::ErrorKind::Unsupported,
            "memory FS doesn't support symlinks",
        ))
    }
}

struct MemoryFile {
    inner: ArcMutexGuard<RawMutex, Vec<u8>>,
    can_read: bool,
    can_write: bool,
    version: i32,
}

impl File for MemoryFile {
    fn read_to_string(&mut self, buffer: &mut String) -> io::Result<()> {
        if !self.can_read {
            return Err(io::Error::new(
                io::ErrorKind::PermissionDenied,

View on GitHub (pinned to 405dedb0ff)

Solutions

  1. Avoid calling `read_link` on a memory filesystem; use the on-disk filesystem for symlink operations.
  2. Gate the symlink code path so it is only reached for filesystems that support links.

Example fix

match fs.read_link(path) { Ok(target) => ..., Err(_) => /* treat as unsupported */ }

When it happens

Trigger: Thrown at crates/biome_fs/src/fs/memory.rs:249 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of biomejs/biome@405dedb0ff (2026-08-20). Data as JSON: /api/errors/74a45429d710819d. Report an issue: GitHub.