You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npm run dev in windows 11 powershell without admin priveldges , it shows the following error
vite version 5.0.8
I have tried the same thing with git bash and cmd.
> part1@0.0.0 dev
> vite --base "./"
✘ [ERROR] Cannot read directory "../../..": Access is denied.
✘ [ERROR] Could not resolve "C:\\Users\\Harsh\\Desktop\\website\\website\\vite.config.js"
failed to load config from C:\Users\Harsh\Desktop\website\website\vite.config.js
error when starting dev server:
Error: Build failed with 2 errors:
error: Cannot read directory "../../..": Access is denied.
error: Could not resolve "C:\\Users\\Harsh\\Desktop\\website\\website\\vite.config.js"
at failureErrorWithLog (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:1651:15)
at C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:1059:25
at runOnEndCallbacks (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:1486:45)
at buildResponseToResult (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:1057:7)
at C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:1086:16
at responseCallbacks.<computed> (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:704:9)
at handleIncomingPacket (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:764:9)
at Socket.readFromStdout (C:\Users\Harsh\Desktop\website\website\node_modules\esbuild\lib\main.js:680:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
note that i added --base "./" to make it the root directory , even before it didnt work.
here's my vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
base: '/',
});
Also npm run dev works if i give it admin priveldges or if i use older versions of vite like 2.5
Can you provide a way to reproduce your issue? Otherwise I'm not going to be able to do anything about this. Marking as unactionable for now. Note that I need all specific instructions and/or source code required to reproduce the problem, not just a config file. I don't use Vite myself and don't know how it works.
fixevanw#3783evanw#4017
On Windows, accessing a folder without read permissions results in an "access denied" error instead of EPERM.
To ensure consistency across platforms, this error is now replaced with EPERM.
voudin
added a commit
to voudin/esbuild
that referenced
this issue
Feb 8, 2025
fixevanw#3783evanw#4017
On Windows, accessing a folder without read permissions results in an "access denied" error instead of EPERM.
To ensure consistency across platforms, this error is now replaced with EPERM.
When running
npm run dev
in windows 11 powershell without admin priveldges , it shows the following errorvite version 5.0.8
I have tried the same thing with git bash and cmd.
note that i added
--base "./"
to make it the root directory , even before it didnt work.here's my vite.config.js
Also
npm run dev
works if i give it admin priveldges or if i use older versions of vite like 2.5Something similar in #2261 but didnt help
The text was updated successfully, but these errors were encountered: