Migrate to Vite - #1794
Conversation
There was a problem hiding this comment.
Thanks @bcotrim for doing this massive change! I have tested on Windows and most of the features work, but I have found an issue creating sites using blueprints.
First, let me describe the tests on Windows:
✅ npm install
✅ npm start
✅ Adding a site
✅ Logging in to WordPress.com
✅ Connect a WordPress.com site
✅ Creating preview sites
✅ Using the AI assistant
But when creating a site using Blueprints, I get the following (I think is a known error):
| Permissions requested to delete the folder | Error |
|---|---|
![]() |
![]() |
The following is the error trace:
[2025-09-22T11:24:51.737Z][erro][main] Failed to setup WordPress site: Error: Could not start server: Error: Error when executing the blueprint step #2 ({"step":"installPlugin","pluginData":{"resource":"wordpress.org/plugins","slug":"akismet"},"options":{"activate":true}}) : Could not create directory "/wordpress/wp-content/AD/[j*)YTGBA^-&yrk#S9[+)jyyN+f(1[xl": Invalid argument.
at C:\Users\robertoaranda\github\studio\dist\main\index.js:12938:28
at ForkUtilityProcess.<anonymous> (C:\Users\robertoaranda\github\studio\node_modules\@sentry\electron\main\utility-processes.js:67:40)
at ForkUtilityProcess.emit (node:events:530:35)
at ForkUtilityProcess.a.emit (node:electron/js2c/browser_init:2:73957)
[2025-09-22T11:25:06.415Z][erro][main] Error occurred in handler for 'createSite': Error: Failed to perform delete operation
[2025-09-22T11:25:06.418Z][erro][ren1] Failed to create site
I have the error using the development version executed with npm start, and with the artifact generated by the CI build for Windows
There was a problem hiding this comment.
Thanks for making these chages @bcotrim. I tested the changes on Mac:
npm install✅npm start✅npm run make✅npm test✅
The builds are also significantly faster than using webpack. 🎉
In both the dev build or when using the packaged build, I can
- Start Studio
- Create a new site using either the Quickstart/Developer Blueprints
- Delete a site
- Log in/log out of WP.com
- Create preview sites
I encountered an issue when trying to create a site using the Commerce Blueprint, I consistently see this error, and I didn't encounter the same on trunk:
[playground-cli] Running the Blueprint...
Activating woocommerce-services – 85%Failed to setup WordPress site: Error: Timeout waiting for response to message 0
at Timeout._onTimeout (/Users/gcsecsey/a8c-projects/studio/dist/main/index.js:13010:18)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7)
Error occurred in handler for 'createSite': Error: Timeout waiting for response to message 0
at Timeout._onTimeout (/Users/gcsecsey/a8c-projects/studio/dist/main/index.js:13010:18)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7)
[playground-cli] Error: ENOENT: no such file or directory, lstat '/Users/gcsecsey/Studio/my-fresh-website'
at lstatSync (node:fs:1716:25)
at t.lstatSync (node:electron/js2c/node_init:2:4546)
at /Users/gcsecsey/a8c-projects/studio/node_modules/@php-wasm/node/index.cjs:446680:46
at PHP.mount (/Users/gcsecsey/a8c-projects/studio/node_modules/@php-wasm/universal/index.cjs:57:3839)
at Object.m [as mountResources] (/Users/gcsecsey/a8c-projects/studio/node_modules/@wp-playground/cli/mounts-BJFrPHGW.cjs:4:553)
at async Object.onPHPInstanceCreated (/Users/gcsecsey/a8c-projects/studio/node_modules/@wp-playground/cli/worker-thread-v1.cjs:2:236)
at async n (/Users/gcsecsey/a8c-projects/studio/node_modules/@wp-playground/wordpress/index.cjs:355:2274)
at async PHPProcessManager.phpFactory (/Users/gcsecsey/a8c-projects/studio/node_modules/@php-wasm/universal/index.cjs:89:3705)
at async PHPProcessManager.doSpawn (/Users/gcsecsey/a8c-projects/studio/node_modules/@php-wasm/universal/index.cjs:83:3025) {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/Users/gcsecsey/Studio/my-fresh-website'
}
[playground-cli] Worker 0 exited with code 1
I'm not sure if this might be related to STU-804.
There was a problem hiding this comment.
@bcotrim, Great work migrating from webpack to Vite ! 🥳
I tested it on Mac using the built app in Buildkite and I confirm the main blockers are solved.
- I was able to create a site using the wp-cli blueprint that downloads an image
- I was able to see the plugins from .org and install a plugin
- I also tested creating a preview site, pulling a wpcom site, talking to the assistant and running wp-cli command from the assistant, and everything worked as expected.
I just noticed two minor things:
- Some RTL styles are gone, for example the What's new modal.
- The Studio CLI returns a warning/error message
[0922/160239.105499:ERROR:node_main.cc(142)] Node.js environment variables are disabled because this process is invoked by other apps. - The thumbnail images on the blueprint screen blink when you select a file. (I'm not sure if this is related to this PR, but it's the first time I've noticed it.)
blueprint-thumbnails-reloading-when-selecting-or-removing-blueprint-file.mp4
Although it seems the ENV variables work as expected:
| <DynamicStylesheet | ||
| id="wordpress-components-style" | ||
| href={ | ||
| i18n?.isRTL() | ||
| ? '../main_window/styles/wordpress-components-style-rtl.css' | ||
| : '../main_window/styles/wordpress-components-style.css' | ||
| } | ||
| /> | ||
| <DynamicStylesheet id="main-window-style" href={ '../main_window.css' } /> |
There was a problem hiding this comment.
I could replicate that issue in trunk and added a attempted fix: #1805
sejas
left a comment
There was a problem hiding this comment.
I am approving it as I think my findings can be addressed as follow-ups.
1d4daec to
3c0b506
Compare
@gcsecsey could you test again please? I pushed some changes from trunk and I could not replicate the issue. Can you confirm it was fixed?
@sejas regarding the images blinking I think it's unrelated to this change, and added another PR with a tentative fix: #1806 as I couldn't replicate it locally.
I am not able to replicate this cli issue, can you give me a step by step? @epeicher @gcsecsey can you try to it on your end to confirm, please?
@epeicher @gcsecsey @sejas would you all agree to take this approach? That way we can split different issues and avoid me being the blocker. |
|
I have done some additional testing. These are my findings:
I have been able to successfully create a site using Commerce Blueprint so it seems this issue is fixed
I have tested the CLI to create and list preview sites and I have not found this error
I agree with this approach. I think the issues found can be addressed as follow-ups and deploy these changes |
My steps were:
|
gcsecsey
left a comment
There was a problem hiding this comment.
@gcsecsey could you test again please? I pushed some changes from trunk and I could not replicate the issue. Can you confirm it was fixed?
I cleared node_modules and did a fresh install, but I'm still getting the same issue on the latest 3c0b506 version. I'm seeing the same error a bit later in the Blueprint installation process:
[playground-cli] Running the Blueprint...
Activating woocommerce-payments – 87%Sentry Logger [log]: Captured error event `Timeout waiting for response to message 0`
Sentry Logger [error]: Transport disabled
Error occurred in handler for 'startServer': Error: Timeout waiting for response to message 0
at Timeout._onTimeout (/Users/gcsecsey/a8c-projects/studio/dist/main/index.js:13002:18)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)
Stopping server with ID 202af4a9-5d07-49ba-bfa6-67edc7c3a910
I suspect it might be something related to my environment though, if others can't reproduce it. 🤔 I'll try looking into this more separately.
The Studio CLI returns a warning/error message [0922/160239.105499:ERROR:node_main.cc(142)] Node.js environment variables are disabled because this process is invoked by other apps.
I also tested listing sites and previews using the CLI but couldn't reproduce this anymore. 👍
@epeicher @gcsecsey @sejas would you all agree to take this approach? That way we can split different issues and avoid me being the blocker.
I agree too, approving it as I think the latest findings are not blockers and can be addressed separately if needed. 👍 🚢
|
I was looking at the performance graphs of Studio https://www.codevitals.run/project/studio/site-editor-load |
It was rather related to introducing Playground CLI in place of wp-now, and using the start logic twice to match the wp-now behavior. We fixed it under another PR where you noticed that performance is back on track. |
|
@youknowriad I think that another "diff" may be a drop caused by switching from wp-now to Playground CLI, and the whole huge spike was caused by an issue with how Studio implemented Playground CLI. It was fixed under #1840, and we are collaborating with the Playground team to identify another "diff". |






Related issues
Proposed Changes
Testing Instructions
npm installnpm startnpm run makePre-merge Checklist