Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symlink issues by using useHostFilesystem #1088

Closed
wants to merge 2 commits into from

Conversation

sejas
Copy link
Member

@sejas sejas commented Mar 18, 2025

Related issues

Proposed Changes

  • I suggest using useHostFilesystem instead of mounting each symlink directory.

Testing Instructions

  1. Have a Studio site where Yoast SEO is not already installed
  2. Download Yoast SEO and extract it to ~/wordpress-seo
  3. In your site's wp-content/plugins directory, run ln -s ../../../../wordpress-seo (you'll need at least four levels of ../, but the symlink also needs to resolve correctly)
  4. Start the Studio site
  5. Navigate to /wp-admin/plugins.php
  6. Observe the Yoast SEO plugin there
  7. Activate it
  8. Observe the site is running correctly as always

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas self-assigned this Mar 18, 2025
@sejas sejas force-pushed the update/use-host-file-system-to-fix-symlinks branch from 4297933 to 80a23d5 Compare March 18, 2025 15:22
@fredrikekelund
Copy link
Contributor

This fixed the problem for me on Mac, but it doesn't work at all on Windows (I can't start sites—even without symlinks). I get the following error on Windows:

 Error: EPERM: operation not permitted, lstat 'C:\Config.Msi'

@fredrikekelund
Copy link
Contributor

Looking at the useHostFilesystem source, it seems possible that it would work on Windows, but we'd need to start by capturing errors thrown from lstatSync.

@wojtekn
Copy link
Contributor

wojtekn commented Mar 19, 2025

Nice, simplifying symlink handling that way looks promising.

@sejas
Copy link
Member Author

sejas commented Mar 25, 2025

I'm closing this PR to find the real issue in Playground/Emscripten. I'll work on it later this week and It will take more time than this solution, but it should be a more conservative solution that fixes the root cause.

@sejas sejas closed this Mar 25, 2025
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.

3 participants