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

esbuild tried to read "../../.." , in vite , using npm run dev #3783

Closed
dragoon4890 opened this issue May 26, 2024 · 2 comments
Closed

esbuild tried to read "../../.." , in vite , using npm run dev #3783

dragoon4890 opened this issue May 26, 2024 · 2 comments

Comments

@dragoon4890
Copy link

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

Something similar in #2261 but didnt help

@evanw
Copy link
Owner

evanw commented Jun 8, 2024

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.

@evanw
Copy link
Owner

evanw commented Jun 25, 2024

Closing because there was no reply.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants