Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Project fails to compile on Node 19 #78

@palle-k

Description

@palle-k

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

SDK Version

7.24.0

Link to Sentry event

No response

What environment is your node script running in?

macOS 13.0.1 on MacBook Pro M1 Max

$ uname -a
Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

$ node --version
v19.2.0

$ npm --version
8.19.3

$ node-gyp --version
v9.3.0


How is your code deployed and bundled?

Issue appears during package installation

Steps to Reproduce

npm i -S @sentry/profiling-node

Expected Result

Package installs successfully

Actual Result

npm ERR! code 1
npm ERR! path /redacted/node_modules/@sentry/profiling-node
npm ERR! command failed
npm ERR! command sh -c -- node scripts/check-build.js
npm ERR! @sentry/profiling-node: Precompiled binary not found, compiling from source...
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.8 found at "/opt/homebrew/opt/[email protected]/bin/python3.10"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.10
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/redacted/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/redacted/node_modules/@sentry/profiling-node/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/redacted/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/redacted/Library/Caches/node-gyp/19.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/redacted/Library/Caches/node-gyp/19.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/redacted/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/redacted/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/redacted/node_modules/@sentry/profiling-node',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../bindings/cpu_profiler.cc:278:49: error: call to implicitly-deleted copy constructor of 'v8::CpuProfilingOptions'
npm ERR!   profiler->cpu_profiler->StartProfiling(title, options);
npm ERR!                                                 ^~~~~~~
npm ERR! /Users/redacted/Library/Caches/node-gyp/19.2.0/include/node/v8-profiler.h:334:3: note: copy constructor is implicitly deleted because 'CpuProfilingOptions' has a user-declared move constructor
npm ERR!   CpuProfilingOptions(CpuProfilingOptions&&) = default;
npm ERR!   ^
npm ERR! /Users/redacted/Library/Caches/node-gyp/19.2.0/include/node/v8-profiler.h:441:48: note: passing argument to parameter 'options' here
npm ERR!       Local<String> title, CpuProfilingOptions options,
npm ERR!                                                ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sentry_cpu_profiler/bindings/cpu_profiler.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/redacted/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.1.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.2.0/bin/node" "/redacted/node_modules/.bin/node-gyp" "build"
npm ERR! gyp ERR! cwd /redacted/node_modules/@sentry/profiling-node
npm ERR! gyp ERR! node -v v19.2.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok 
npm ERR! @sentry/profiling-node: Failed to build from source, please report this a bug at https://github.com/getsentry/profiling-node/issues/new?assignees=&labels=Type%3A+Bug&template=bug.yml
npm ERR! /redacted/node_modules/@sentry/profiling-node/scripts/check-build.js:43
npm ERR!   throw e;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/redacted/node_modules/@sentry/profiling-node/binaries/sentry_cpu_profiler-v111-darwin-arm64.node'
npm ERR! Require stack:
npm ERR! - /redacted/node_modules/@sentry/profiling-node/scripts/check-build.js
npm ERR!     at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:885:27)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1105:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:103:18)
npm ERR!     at Object.<anonymous> (/redacted/node_modules/@sentry/profiling-node/scripts/check-build.js:23:3)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1218:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1081:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:922:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [
npm ERR!     '/redacted/node_modules/@sentry/profiling-node/scripts/check-build.js'
npm ERR!   ]
npm ERR! }
npm ERR! 
npm ERR! Node.js v19.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions