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

@sentry/profiling-node fails to build in Docker via Yarn #13668

Closed
3 tasks done
gregsj opened this issue Sep 12, 2024 · 1 comment
Closed
3 tasks done

@sentry/profiling-node fails to build in Docker via Yarn #13668

gregsj opened this issue Sep 12, 2024 · 1 comment
Labels
Package: node Issues related to the Sentry Node SDK

Comments

@gregsj
Copy link

gregsj commented Sep 12, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.30.0

Framework Version

node:20-alpine

Link to Sentry event

No response

Reproduction Example/SDK Setup

FROM node:20-alpine
WORKDIR /backend
# Install yarn and other dependencies via apk
RUN apk update && apk add yarn python3 g++ make && rm -rf /var/cache/apk/*
# Install app dependencies - For NPM use: `COPY package.json package-lock.lock ./`
COPY ./package.json ./yarn.lock ./ 
# For NPM use: `RUN npm ci`
RUN yarn --pure-lockfile

Steps to Reproduce

Since 08/23/24 we've been unable to successfully build with @sentry/profiling-node within Docker. Removing @sentry/profiling-node allows us to build.

  1. Setup project with the following in package.json
  "engines": {
    "node": ">=20.0.0"
  },
  "dependencies": {
   ...
    "@sentry/node": "^8.30.0",
    "@sentry/profiling-node": "^8.30.0",
   ...
  },
  1. Setup DockerFile with the
FROM node:20-alpine
WORKDIR /backend
# Install yarn and other dependencies via apk
RUN apk update && apk add yarn python3 g++ make && rm -rf /var/cache/apk/*
# Install app dependencies - For NPM use: `COPY package.json package-lock.lock ./`
COPY ./package.json ./yarn.lock ./ 
# For NPM use: `RUN npm ci`
RUN yarn --pure-lockfile

run docker-compose build --no-cache

Expected Result

successful build

Actual Result

when running yarn --pure-lockfile in Docker we get the following output

35.47 error /backend/node_modules/@sentry/profiling-node: Command failed.
35.47 Exit signal: SIGSEGV
35.47 Command: node scripts/check-build.js
35.47 Arguments: 
35.47 Directory: /backend/node_modules/@sentry/profiling-node
35.47 Output:
35.47 @sentry/profiling-node: Precompiled binary found, attempting to load /backend/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-musl-115.node
35.47 @sentry/profiling-node: Precompiled binary found, skipping build from source.
35.48 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn --pure-lockfile" did not complete successfully: exit code: 1
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Sep 12, 2024
@chargome
Copy link
Member

closing in favour of #12169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK
Projects
Archived in project
Development

No branches or pull requests

2 participants