sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Sentry CLI Plugin: spawn /node_modules/@sentry/webpack-plugin/node_modules/@sentry/cli/sentry-cli ENOENT

Open avivasyuta opened this issue 2 years ago • 1 comments

Environment

We have self-hosted Sentry v9.1.2

Which SDK and version? SentryWebpackPlugin v1.18.9

Steps to Reproduce

  1. Add @sentry/webpack-plugin to webpack config
  2. Run npm ci --ignore-scripts
  3. Run npm run build

Expected Result

Build completes successfully

Actual Result

Build fails with error

[boilerplate] error [
  {
    message: 'Sentry CLI Plugin: spawn /Users/aleksey/PhpstormProjects/sx-item-creator/node_modules/@sentry/webpack-plugin/node_modules/@sentry/cli/sentry-cli ENOENT',
    details: undefined,
    stack: 'Error: Sentry CLI Plugin: spawn /Users/aleksey/PhpstormProjects/sx-item-creator/node_modules/@sentry/webpack-plugin/node_modules/@sentry/cli/sentry-cli ENOENT\n' +
      '    at /Users/aleksey/PhpstormProjects/sx-item-creator/node_modules/@sentry/webpack-plugin/src/index.js:539:15\n' +
      '    at errorHandler (/Users/aleksey/PhpstormProjects/sx-item-creator/node_modules/@sentry/webpack-plugin/src/index.js:459:9)\n' +
      '    at /Users/aleksey/PhpstormProjects/sx-item-creator/node_modules/@sentry/webpack-plugin/src/index.js:535:9\n' +
      '    at runMicrotasks (<anonymous>)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:95:5)'
  }
]

Hello. I encountered an error when the build crashes in CI if using the plugin and npm ci --ignore-scripts. I read issue 1085 issue 915 and issue 1129 and I totally can't understand how parameters SENTRYCLI_USE_LOCAL and SENTRYCLI_CDNURL can help me. The options are checked inside the install script, but it will not be called when installing dependencies via npm ci --ignore-scripts.

Please, help me solve the problem.

avivasyuta avatar Jul 20 '22 07:07 avivasyuta

It's not possible to use @sentry/cli with ignore-scripts flag. SENTRYCLI_USE_LOCAL only allows you to control which binary will be picked up by the mentioned script, so you have a control over what's being downloaded. However, the script itself still has to be executed.

kamilogorek avatar Jul 25 '22 12:07 kamilogorek

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Aug 16 '22 00:08 github-actions[bot]