Skip to content

Conversation

Wendong-Fan
Copy link
Contributor

  1. The original code used lib/site-packages, but Python venvs actually use lib/python3.X/site-packages where X is the version number, the toolkit directory could never be found. fixed it to automatically detect the Python version and build the correct path.

  2. The code assumed stdout and stderr are always available, but they can be null in certain scenarios, added safety checks before trying to read from these streams to prevent crashes.

  3. When testing if npm exists, the code only listened for the 'close' event. If npm doesn't exist or fails to run, the 'error'
    event fires instead, causing the check to hang forever. added an error handler to properly handle this case.

  4. the npm/build/playwright processes only had 'close' handlers but no 'error' handlers. If a process fails to start,
    it triggers 'error' not 'close', which would cause the installation to hang. added error handlers for all three processes.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@Wendong-Fan Wendong-Fan self-assigned this Oct 4, 2025
Copy link
Collaborator

@nitpicker55555 nitpicker55555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added isolated npm cache directory because users who previously used sudo npm may have permission conflicts with the system npm cache.

@Wendong-Fan Wendong-Fan merged commit 509f8d4 into fix/browser_install Oct 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants