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 does not recognize the analyze flag when the serve flag is used #3266

Closed
flowstate247 opened this issue Jul 21, 2023 · 0 comments
Closed

Comments

@flowstate247
Copy link

flowstate247 commented Jul 21, 2023

$ esbuild --version
0.18.15


$ esbuild src/index.ts --outfile=index.js --bundle --analyze

  index.js                                               1.4mb  100.0%
   ├ node_modules/@zhobo63/imgui-ts/src/bind-imgui.js    1.1mb   79.3%
   ├ node_modules/@zhobo63/imgui-ts/src/imgui.ts       232.5kb   16.7%
   ├ node_modules/@zhobo63/imgui-ts/src/imgui_impl.ts   45.7kb    3.3%
   ├ node_modules/@zhobo63/imgui-ts/src/font.ts          4.8kb    0.3%
   ├ node_modules/@zhobo63/imgui-ts/src/input.ts         2.5kb    0.2%
   └ src/index.ts                                        1.1kb    0.1%


  index.js  1.4mb


$ esbuild src/index.ts --outfile=index.js --bundle --analyze --serve
X [ERROR] Invalid build flag: "--analyze"

1 error
node:child_process:924
    throw err;
    ^

Error: Command failed: C:\Users\xyz\AppData\Roaming\npm\node_modules\esbuild\node_modules\@esbuild\win32-x64\esbuild.exe src/index.ts --outfile=index.js --bundle --analyze --serve
    at checkExecSyncError (node:child_process:885:11)
    at Object.execFileSync (node:child_process:921:15)
    at Object.<anonymous> (C:\Users\xyz\AppData\Roaming\npm\node_modules\esbuild\bin\esbuild:220:28)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 22844,
  stdout: null,
  stderr: null
}

Node.js v18.16.1
@evanw evanw closed this as completed in 64f97bd Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant