Skip to content

webcontainer becomes unresponsive for >1 minute with recursive fs.watch after installing dependency #1569

@bigmistqke

Description

@bigmistqke

Describe the bug

After installing p.ex vinxi with webContainer.fs.watch('.', { recursive: true }, callback) the webcontainer becomes unresponsive after the dependency is installed for more then a minute (72s). If I don't watch recursively this delay does not happen.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-j9vwpr?file=main.js

Steps to reproduce

  1. let the package install itself
  2. notice how it takes > 1 minute to read the package.json after the package is installed (stackblitz' editor also becomes unresponsive during this time)

Expected behavior

to not take so long.

Parity with Local

Screenshots

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions