vuejs / create-vue

🛠️ The recommended way to start a Vite-powered Vue project
Other
3.8k stars 432 forks source link

fix(playwright): use `npm run` to start the server on default port #540

Closed zetaraku closed 4 months ago

zetaraku commented 4 months ago

Description

When running Playwright end-to-end testing from Playwright Test for VSCode, an error is thrown:

Error: Process from config.webServer was not able to start. Exit code: 1

This is probably because the extension runs without adding node_modules/.bin to PATH like npm run does.

What this PR does

This PR uses npm run to start the server and adjusts the port according to the default port of vite dev or vite preview.