vscode-vite icon indicating copy to clipboard operation
vscode-vite copied to clipboard

Issue with configuration: server starts in wrong location

Open ManfredLange opened this issue 2 years ago • 2 comments

My repository root is at location /work

The app using Vite is at /work/app

I tried setting the base path for opening the app (Base path for open the app) to /work/app but that didn't work as it still thinks that it should start in /work instead of /work/app

I tried changing the setting "Vite: Dev Command" to cd /work/app && npm run dev. It now does something but now it shows the following error:

[vite] Internal server error: Failed to resolve entry for package "/work/app". The package may have incorrect main/module/exports specified in its package.json.

However, running npm run dev in directory /work/app works just fine.

Note that the VS Code workspace is the root of the local clone. That directory is /work.

I've run out of ideas what else to try. Any and all suggestions would be very much appreciated!

ManfredLange avatar Oct 27 '23 06:10 ManfredLange

Ever find a solution to this? I'm getting something similar

jacksonthall22 avatar Jan 29 '24 05:01 jacksonthall22