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

Running esbuild.exe or install esbuild failed with status 3221226505 #2929

Closed
axslzj opened this issue Feb 16, 2023 · 5 comments
Closed

Running esbuild.exe or install esbuild failed with status 3221226505 #2929

axslzj opened this issue Feb 16, 2023 · 5 comments

Comments

@axslzj
Copy link

axslzj commented Feb 16, 2023

esbuild: 0.17.8
nodejs: v14.21.2
npm: 6.14.17
Windows 11

D:\vite-project> .\node_modules\.bin\esbuild --version
node:child_process:729
    throw err;
    ^

Error: Command failed: D:\vite-project\node_modules\@esbuild\win32-x64\esbuild.exe --version
    at checkExecSyncError (node:child_process:707:11)
    at Object.execFileSync (node:child_process:726:15)
    at Object.<anonymous> (D:\lins\vueadmin\vite-project\node_modules\esbuild\bin\esbuild:220:28)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  status: 3221226505,
  signal: null,
  output: [ null, null, null ],
  pid: 7116,
  stdout: null,
  stderr: null
}
@evanw
Copy link
Owner

evanw commented Feb 16, 2023

This is not a helpful issue report. I'm marking this as unactionable because there's nothing I can do with this.

People typically get into these types of situations when their package installation fails for some reason (e.g. they copy a folder from another operating system). In that case, a reinstall often fixes it. Another thing to check could be whether the file node_modules\@esbuild\win32-x64\esbuild.exe exists, is accessible, and hasn't been blocked by your local anti-virus software (since you're using Windows, and anti-virus makes running any executable flaky on Windows). This is something you'll have to debug for yourself on your end though.

@evanw
Copy link
Owner

evanw commented Feb 19, 2023

Closing because this is unactionable, and is likely not something esbuild can fix.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2023
@shigma
Copy link

shigma commented Mar 20, 2023

I can reproduce this with my macbook, totally new project:

mkdir test
cd test
yarn init -y
yarn add esbuild -D
error /Users/shigma/Documents/coding/test2/node_modules/esbuild: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/shigma/Documents/coding/test2/node_modules/esbuild
Output:
node:child_process:828
    err = new Error(msg);
          ^

Error: Command failed: /usr/local/bin/node /Users/shigma/Documents/coding/test2/node_modules/esbuild/bin/esbuild --version
node:child_process:869
    throw err;
    ^

Error: Command failed: /Users/shigma/Documents/coding/test2/node_modules/@esbuild/darwin-x64/bin/esbuild --version
    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:866:15)
    at Object.<anonymous> (/Users/shigma/Documents/coding/test2/node_modules/esbuild/bin/esbuild:220:28)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  status: null,
  signal: 'SIGKILL',
  output: [ null, null, null ],
  pid: 83379,
  stdout: null,
  stderr: null
}

    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:866:15)
    at validateBinaryVersion (/Users/shigma/Documents/coding/test2/node_modules/esbuild/install.js:98:28)
    at /Users/shigma/Documents/coding/test2/node_modules/esbuild/install.js:283:5 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(908) [Uint8Array] [
      110, 111, 100, 101,  58,  99, 104, 105, 108, 100,  95, 112,
      114, 111,  99, 101, 115, 115,  58,  56,  54,  57,  10,  32,
       32,  32,  32, 116, 104, 114, 111, 119,  32, 101, 114, 114,
       59,  10,  32,  32,  32,  32,  94,  10,  10,  69, 114, 114,
      111, 114,  58,  32,  67, 111, 109, 109,  97, 110, 100,  32,
      102,  97, 105, 108, 101, 100,  58,  32,  47,  85, 115, 101,
      114, 115,  47, 115, 104, 105, 103, 109,  97,  47,  68, 111,
       99, 117, 109, 101, 110, 116, 115,  47,  99, 111, 100, 105,
      110, 103,  47, 116,
      ... 808 more items
    ]
  ],
  pid: 83378,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(908) [Uint8Array] [
    110, 111, 100, 101,  58,  99, 104, 105, 108, 100,  95, 112,
    114, 111,  99, 101, 115, 115,  58,  56,  54,  57,  10,  32,
     32,  32,  32, 116, 104, 114, 111, 119,  32, 101, 114, 114,
     59,  10,  32,  32,  32,  32,  94,  10,  10,  69, 114, 114,
    111, 114,  58,  32,  67, 111, 109, 109,  97, 110, 100,  32,
    102,  97, 105, 108, 101, 100,  58,  32,  47,  85, 115, 101,
    114, 115,  47, 115, 104, 105, 103, 109,  97,  47,  68, 111,
     99, 117, 109, 101, 110, 116, 115,  47,  99, 111, 100, 105,
    110, 103,  47, 116,
    ... 808 more items
  ]
}
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@shigma
Copy link

shigma commented Mar 20, 2023

Update: this problem only occurs with 0.17.12 for me.

However, 0.17.11 is released after the time that this issue was posted. 🤣

@itomicprothos
Copy link

I am gonna leave the topic open for the product owner to close but:
@shigma you preempted me by 5 minutes

I don't know about the release timing, it's what i had

That being said, i also figured out what went wrong

My company group policy regulates very strictly execution of code (scripts and executables) - and why it was failing
For anybody who's got the same root cause, the solution in my case was to add the root path to the Local Security Policy with an Allow rule - works like a charm ever since :)

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

4 participants