Skip to content

Remix sourcemap upload cannot find @sentry/cli #9545

@fobos531

Description

@fobos531

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

7.80.0

Framework Version

Remix 2.2.0

Link to Sentry event

No response

SDK Setup

 Sentry.init({
    dsn: 'REDACTED',
    tracesSampleRate: 1,
    replaysSessionSampleRate: 0.1,
    replaysOnErrorSampleRate: 1,
    enabled: getEnv().REMIX_ENV !== 'development',
    environment: getEnv().REMIX_ENV,
    tunnel: '/api/tunnel',

    integrations: [
      new Sentry.BrowserTracing({
        routingInstrumentation: Sentry.remixRouterInstrumentation(useEffect, useLocation, useMatches),
      }),
      new Sentry.Replay(),
    ],
  });

Steps to Reproduce

  1. Initialize a sample project with Remix
  2. Run the sentry wizard
  3. Try uploading the sourcemaps via npx remix build --sourcemap && npx sentry-upload-sourcemaps --org MyOrg --project MyProj

Expected Result

The sourcemaps upload should work fine.

Actual Result

Error: Command failed: /Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli sourcemaps inject public/build
/bin/sh: /Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli: No such file or directory

    at checkExecSyncError (node:child_process:885:11)
    at execSync (node:child_process:957:15)
    at injectDebugId (/Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/remix/scripts/injectDebugId.js:10:5)
    at Object.<anonymous> (/Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/remix/scripts/sentry-upload-sourcemaps.js:71:3)
    at Module._compile (node:internal/modules/cjs/loader:1226:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)
    at Module.load (node:internal/modules/cjs/loader:1089:32)
    at Module._load (node:internal/modules/cjs/loader:930:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  status: 127,
  signal: null,
  output: [
    null,
    <Buffer >,
    <Buffer 2f 62 69 6e 2f 73 68 3a 20 2f 55 73 65 72 73 2f 6a 61 6b 6f 76 67 6c 61 76 69 6e 61 2f 50 6f 73 61 6f 2f 62 32 67 2d 63 6f 6e 73 75 6c 74 69 6e 67 2f ... 71 more bytes>
  ],
  pid: 38153,
  stdout: <Buffer >,
  stderr: <Buffer 2f 62 69 6e 2f 73 68 3a 20 2f 55 73 65 72 73 2f 6a 61 6b 6f 76 67 6c 61 76 69 6e 61 2f 50 6f 73 61 6f 2f 62 32 67 2d 63 6f 6e 73 75 6c 74 69 6e 67 2f ... 71 more bytes>
}
[sentry] Failed to propose a release version.
[sentry] You can specify a release version with `--release` flag.
[sentry] For example: `sentry-upload-sourcemaps --release 1.0.0`
node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: spawn /Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli',
  path: '/Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli',
  spawnargs: [ 'releases', 'propose-version' ],
  cmd: '/Users/jakovglavina/Posao/REDACTED/web/node_modules/@sentry/cli/sentry-cli releases propose-version'
}

Metadata

Metadata

Assignees

Labels

Package: remixIssues related to the Sentry Remix SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions