sentry-prune-profiler-binaries
does not recognize NodeJS 22 as a valid major node version
#14488
Open
3 tasks done
Labels
Package: profiling-node
Issues related to the Sentry Profiling Node SDK
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.40.0
Framework Version
NodeJS v22
Link to Sentry event
No response
Reproduction Example/SDK Setup
My package.json dependencies:
As part of my webpack build for my lambda I copy the sentry profile binaries from the Sentry node package (
'./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-*.node'
) and strip them with the command:node_modules/.bin/sentry-prune-profiler-binaries --target_dir_path=./dist/lambda/sentry --target_platform=linux --target_node=22 --target_stdlib=glibc --target_arch=x64
This command used to be
--target_node=20
, but with AWS Lambda supporting v22 I changed it to v22.However, the command gives as output:
❌ Sentry: Invalid node version passed as argument, please make sure --target_node is a valid major node version. Supported versions are 16, 18 and 20.
As NodeJS become LTS last month, I was expecting the pruner to have support for this. Hopefully it is only a matter of adding the integer to the code.
I found the check to reside here:
sentry-javascript/packages/profiling-node/scripts/prune-profiler-binaries.js
Line 75 in 1d32374
Steps to Reproduce
Expected Result
One left-over files from the prune list, without error.
Actual Result
Error not supporting NodeJS v22
The text was updated successfully, but these errors were encountered: