Skip to content

Sentry CLI Plugin ENOENT error with npm ci --ignore-scripts #1085

@PsyGik

Description

@PsyGik

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
e.g: JavaScript (latest @sentry/nextjs)

Steps to Reproduce

  1. Setup Sentry for Next.js project
  2. CI starts the build with npm ci --ignore-scripts
  3. Run npm build
  4. Sentry fails with the below error.
Run `npm audit` for details.
❯ npm run build

> try-sentry-nextjs@0.1.0 build
> next build

info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types
info  - Creating an optimized production build
Failed to compile.

Sentry CLI Plugin: spawn /Users/ddd/Development/Reviews/try-sentry-nextjs-review/node_modules/@sentry/cli/sentry-cli ENOENT


> Build error occurred
Error: > Build failed because of webpack errors
    at /Users/ddd/Development/Reviews/try-sentry-nextjs-review/node_modules/next/dist/build/index.js:397:19
    at async Span.traceAsyncFn (/Users/ddd/Development/Reviews/try-sentry-nextjs-review/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async Object.build [as default] (/Users/ddd/Development/Reviews/try-sentry-nextjs-review/node_modules/next/dist/build/index.js:77:25)

Expected Result

Sentry should not be executing stuff in CI environments.

Actual Result

Sentry executes stuff in CI environments.


Related: #915

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions