I've had an issue building the segfault-handler node module with npm since upgrading to node 16.19.0. It seems like there's a missing dependency: 127 error /Users/****/Library/Caches/node-gyp/16.19.0/include/node/v8.h:22:10: fatal error: atomic: No such file or directory
Here's the full log:
116 verbose stack Error: command failed
116 verbose stack at ChildProcess.<anonymous> (/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
116 verbose stack at ChildProcess.emit (node:events:513:28)
116 verbose stack at maybeClose (node:internal/child_process:1100:16)
116 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
117 verbose pkgid segfault-handler@1.3.0
118 verbose cwd /Users/****/Code/****/*****
119 verbose Darwin 21.6.0
120 verbose node v16.19.0
121 verbose npm v8.19.3
122 error code 1
123 error path /Users/****/Code/*****/*****/node_modules/segfault-handler
124 error command failed
125 error command sh -c -- node-gyp rebuild
126 error CXX(target) Release/obj.target/segfault-handler/src/segfault-handler.o
127 error gyp info it worked if it ends with ok
127 error gyp info using node-gyp@9.3.1
127 error gyp info using node@16.19.0 | darwin | x64
127 error gyp info find Python using Python version 3.9.12 found at "/Users/****/opt/anaconda3/bin/python3"
127 error gyp info spawn /Users/****/opt/anaconda3/bin/python3
127 error gyp info spawn args [
127 error gyp info spawn args '/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
127 error gyp info spawn args 'binding.gyp',
127 error gyp info spawn args '-f',
127 error gyp info spawn args 'make',
127 error gyp info spawn args '-I',
127 error gyp info spawn args '/Users/****/Code/*****/*****/node_modules/segfault-handler/build/config.gypi',
127 error gyp info spawn args '-I',
127 error gyp info spawn args '/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
127 error gyp info spawn args '-I',
127 error gyp info spawn args '/Users/****/Library/Caches/node-gyp/16.19.0/include/node/common.gypi',
127 error gyp info spawn args '-Dlibrary=shared_library',
127 error gyp info spawn args '-Dvisibility=default',
127 error gyp info spawn args '-Dnode_root_dir=/Users/****/Library/Caches/node-gyp/16.19.0',
127 error gyp info spawn args '-Dnode_gyp_dir=/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/node-gyp',
127 error gyp info spawn args '-Dnode_lib_file=/Users/****/Library/Caches/node-gyp/16.19.0/<(target_arch)/node.lib',
127 error gyp info spawn args '-Dmodule_root_dir=/Users/****/Code/****/****t/node_modules/segfault-handler',
127 error gyp info spawn args '-Dnode_engine=v8',
127 error gyp info spawn args '--depth=.',
127 error gyp info spawn args '--no-parallel',
127 error gyp info spawn args '--generator-output',
127 error gyp info spawn args 'build',
127 error gyp info spawn args '-Goutput_dir=.'
127 error gyp info spawn args ]
127 error gyp info spawn make
127 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
127 error In file included from /Users/****/Library/Caches/node-gyp/16.19.0/include/node/node.h:73,
127 error from ../../nan/nan.h:60,
127 error from ../src/segfault-handler.cpp:2:
127 error /Users/****/Library/Caches/node-gyp/16.19.0/include/node/v8.h:22:10: fatal error: atomic: No such file or directory
127 error 22 | #include <atomic>
127 error | ^~~~~~~~
127 error compilation terminated.
127 error make: *** [Release/obj.target/segfault-handler/src/segfault-handler.o] Error 1
127 error gyp ERR! build error
127 error gyp ERR! stack Error: `make` failed with exit code: 2
127 error gyp ERR! stack at ChildProcess.onExit (/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:203:23)
127 error gyp ERR! stack at ChildProcess.emit (node:events:513:28)
127 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
127 error gyp ERR! System Darwin 21.6.0
127 error gyp ERR! command "/Users/****/.nvm/versions/node/v16.19.0/bin/node" "/Users/****/.nvm/versions/node/v16.19.0/lib/node_modules/npm/node_modules/@npmcli/run-script/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
127 error gyp ERR! cwd /Users/****/Code/****/****/node_modules/segfault-handler
127 error gyp ERR! node -v v16.19.0
127 error gyp ERR! node-gyp -v v9.3.1
127 error gyp ERR! not ok
128 verbose exit 1
I've had an issue building the segfault-handler node module with npm since upgrading to node 16.19.0. It seems like there's a missing dependency:
127 error /Users/****/Library/Caches/node-gyp/16.19.0/include/node/v8.h:22:10: fatal error: atomic: No such file or directory
Here's the full log: