[SOLVED] Meteor 3.1 node-gyp rebuild failed (My bad, caching issue)

node@22.12.0
node-gyp@10.2.0

Something was wrong. I think it worked on Meteor 3.0

akkk@akkk-001-a:~/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@10.2.0
gyp info using node@22.12.0 | linux | x64
gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"

gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/home/akkk/.nvm/versions/node/v22.12.0/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/akkk/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/akkk/.nvm/versions/node/v22.12.0/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/akkk/.cache/node-gyp/22.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/akkk/.cache/node-gyp/22.12.0',
gyp info spawn args '-Dnode_gyp_dir=/home/akkk/.nvm/versions/node/v22.12.0/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/akkk/.cache/node-gyp/22.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/akkk/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/akkk/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
In file included from ../src/posix.cc:1:
../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../../nan/nan.h:2548:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&)’
 2548 |   tpl->SetAccessor(
      |   ~~~~~~~~~~~~~~~~^
 2549 |       name
      |       ~~~~         
 2550 |     , getter_
      |     ~~~~~~~~~      
 2551 |     , setter_
      |     ~~~~~~~~~      
 2552 |     , obj
      |     ~~~~~          
 2553 |     , settings
      |     ~~~~~~~~~~     
 2554 |     , attribute
      |     ~~~~~~~~~~~    
 2555 | #if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2556 |     , signature
      |     ~~~~~~~~~~~    
 2557 | #endif
      | ~~~~~~             
 2558 |   );
      |   ~                
In file included from /home/akkk/.cache/node-gyp/22.12.0/include/node/v8-function.h:15,
                 from /home/akkk/.cache/node-gyp/22.12.0/include/node/v8.h:33,
                 from /home/akkk/.cache/node-gyp/22.12.0/include/node/node.h:73,
                 from ../../nan/nan.h:62,
                 from ../src/posix.cc:1:
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1049:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
 1049 |   void SetAccessor(
      |        ^~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1052:61: note:   no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
 1052 |       Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
      |                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1055:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
 1055 |   void SetAccessor(
      |        ^~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1058:61: note:   no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
 1058 |       Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
      |                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ../src/posix.cc:1:
../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../../nan/nan.h:2594:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&)’
 2594 |   tpl->SetAccessor(
      |   ~~~~~~~~~~~~~~~~^
 2595 |       name
      |       ~~~~         
 2596 |     , getter_
      |     ~~~~~~~~~      
 2597 |     , setter_
      |     ~~~~~~~~~      
 2598 |     , obj
      |     ~~~~~          
 2599 |     , settings
      |     ~~~~~~~~~~     
 2600 |     , attribute
      |     ~~~~~~~~~~~    
 2601 |   );
      |   ~                
In file included from /home/akkk/.cache/node-gyp/22.12.0/include/node/v8-function.h:15,
                 from /home/akkk/.cache/node-gyp/22.12.0/include/node/v8.h:33,
                 from /home/akkk/.cache/node-gyp/22.12.0/include/node/node.h:73,
                 from ../../nan/nan.h:62,
                 from ../src/posix.cc:1:
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1049:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
 1049 |   void SetAccessor(
      |        ^~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1052:61: note:   no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
 1052 |       Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
      |                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1055:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
 1055 |   void SetAccessor(
      |        ^~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/v8-template.h:1058:61: note:   no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
 1058 |       Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
      |                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ../../nan/nan.h:62,
                 from ../src/posix.cc:1:
../src/posix.cc: At global scope:
/home/akkk/.cache/node-gyp/22.12.0/include/node/node.h:1226:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
 1226 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/akkk/.cache/node-gyp/22.12.0/include/node/node.h:1260:3: note: in expansion of macro ‘NODE_MODULE_X’
 1260 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/posix.cc:709:1: note: in expansion of macro ‘NODE_MODULE’
  709 | NODE_MODULE(posix, init);
      | ^~~~~~~~~~~
make: *** [posix.target.mk:110: Release/obj.target/posix/src/posix.o] Error 1
make: Leaving directory '/home/akkk/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/home/akkk/.nvm/versions/node/v22.12.0/lib/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Linux 6.8.0-1020-gcp
gyp ERR! command "/home/akkk/.nvm/versions/node/v22.12.0/bin/node" "/home/akkk/.nvm/versions/node/v22.12.0/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/akkk/development/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/posix
gyp ERR! node -v v22.12.0
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok 

Ubuntu 22.04.5 LTS x86-64

It happened when trying to build posix npm module

{
    "name": "posix",
    "version": "4.2.0",
    "description": "The missing POSIX system calls",
    "license": "MIT",
    "keywords" : [
        "posix", "rlimit", "getrlimit", "setrlimit", "ulimit", "setuid",
        "setgid", "seteuid", "setegid", "chroot", "setreuid", "setregid",
        "getpgrp", "setsid", "setpgid", "getpwnam", "getgrnam", "uid", "gid",
        "initgroups", "syslog", "setlogmask", "gethostname", "sethostname",
        "swapon", "swapoff"
    ],
    "homepage": "http://github.com/ohmu/node-posix",
    "repository" : {
        "type" : "git",
        "url" : "git://github.com/ohmu/node-posix.git"
    },
    "author" : "Mika Eloranta <mel@ohmu.fi>",
    "main" : "./lib/posix",
    "dependencies" : {
        "nan": "^2.14.x"
    },
    "scripts" : {
        "test" : "make test"
    },
    "engines" : { "node": ">= 0.10.0" }
}

My bad. I removed existing deployment then deployed it again and it works.