-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Windows Installation Issue with other packages #3995
Comments
I guess it has some thing to do with your terminal being executed under administrator permission. You can try to use a normal (user) permission terminal to see if it still happens. |
I did tried using terminal under non-admin permission and still get the same result. |
This doesn't look good:
First, the fact that esbuild is trying to download itself at all instead of letting npm do it (which I know it's doing since it's renaming a file called Second, the rename syscall failing sounds like an anti-virus issue to me given that it's Windows and a) Windows typically has anti-virus running and b) unlike Unix, Windows doesn't support renaming a file while something is using it. When esbuild downloads itself, it downloads into a temporary file and then renames that file to the destination instead of downloading into the destination to avoid ending up with a partially-downloaded file in the destination (file renaming is an atomic operation). I'm guessing the anti-virus is keeping the file open and preventing it from being moved. If fixing optional packages doesn't fix this, then I'm not sure how to fix this other than to change something about your anti-virus. This situation is sort of a fundamental flaw with using anti-virus on Windows. Some programs try to get around this by retrying the operation after a delay (hoping that the anti-virus is done messing with the file), but that isn't guaranteed to work either and slows everything else down if the underlying problem is actually a permission issue, so I don't want to do that. |
This has really stumped me. Pardon if this should be reported in another Github repository, but since I am having specific issue only with this package, I thought as well of reporting here.
In a nutshell, the package
@esbuild/win32-x64
fails when it is being installed alongside other packages for an application. In a clean, only @esbuild install, it downloads fine.This is the scenario I have tested it upon.
Machine OS & Details
React Application
npm create vite@latest vite-react-ts -- --template react-ts
vite-react-ts
foldernpm install
and I get the following in the console:node_modules
is not createdEmpty Application
empty
and navigate inside itnpm init
esbuild
package alone vianpm i @esbuild/win32-x64
node_modules\@esbuild\win32-x64
and list the contents.Legacy Application (Initialized with Create React App)
@esbuild
to an existing application vianpm i @esbuild/win32-x64
, I get the the folder@esbuild\win32-x64
being created insidenode_modules
, but the fileesbuild.exe
is not presentOther Notes
https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz
, extracting theesbuild.exe
file and attempting to copy it to the folder inside thenode_modules
folder but get theAccess Denied
Has anyone experienced this issue before?
The text was updated successfully, but these errors were encountered: