-
Notifications
You must be signed in to change notification settings - Fork 69
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
Can't get raw socket to work with npm in Node 20. Gets compiler error about SetAccessor() #87
Comments
Try using an older, compatible version of Node.js that is known to work with the |
i can install nan no problem. the current version is 2.18, and i have tried using 2.17 and 2.14.
I am installing using the -g option for global use
have no idea how to rebuild the raw-socket package manually.
I am on OSX, but i am also failing to get the raw-socket to install on Centos 6.5, which has Node 20 as well.
The nan.h and raw.h files are having problem some missing class function. Clearly someone has changed something and broken things.
such a great library, the ICMP packet is the most efficient way to ping a server with a single packet.
… On Apr 7, 2024, at 11:05 PM, Tasdiqul Huq ***@***.***> wrote:
Try using an older, compatible version of Node.js that is known to work with the raw-socket package.
If you don't need the specific functionality provided by the raw-socket package, try using a different package that provides similar functionality but is more compatible with your current Node.js version.
Rebuild the nan module:
a. Delete the node_modules folder and the package-lock.json file in your project.
b. Run npm install nan to reinstall the nan module.
c. Try installing the raw-socket package again.
Try installing a specific version of the nan module that is known to work with your Node.js version and the raw-socket package, e.g., npm install ***@***.***
The raw-socket package may have specific instructions or requirements for the Node.js version and dependencies. Check the package's documentation or GitHub repository for any guidance on compatible versions or workarounds.
If the above steps don't work, try building the raw-socket package manually using the node-gyp tool by running node-gyp rebuild in the raw-socket package directory.
—
Reply to this email directly, view it on GitHub <#87 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJ2FLDKRNEXWV244M2IIIDY4IXRFAVCNFSM6AAAAABF4A4MM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRHEZDSMZTGE>.
You are receiving this because you authored the thread.
|
I am not expecting free labor; i am not wealthy by any stretch, but would be glad to compensate you for helping me get past this. My alternative is go back to C code, and do it the old school way, which is also painful.
regards,
edward
… On Apr 7, 2024, at 11:05 PM, Tasdiqul Huq ***@***.***> wrote:
Try using an older, compatible version of Node.js that is known to work with the raw-socket package.
If you don't need the specific functionality provided by the raw-socket package, try using a different package that provides similar functionality but is more compatible with your current Node.js version.
Rebuild the nan module:
a. Delete the node_modules folder and the package-lock.json file in your project.
b. Run npm install nan to reinstall the nan module.
c. Try installing the raw-socket package again.
Try installing a specific version of the nan module that is known to work with your Node.js version and the raw-socket package, e.g., npm install ***@***.***
The raw-socket package may have specific instructions or requirements for the Node.js version and dependencies. Check the package's documentation or GitHub repository for any guidance on compatible versions or workarounds.
If the above steps don't work, try building the raw-socket package manually using the node-gyp tool by running node-gyp rebuild in the raw-socket package directory.
—
Reply to this email directly, view it on GitHub <#87 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJ2FLDKRNEXWV244M2IIIDY4IXRFAVCNFSM6AAAAABF4A4MM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRHEZDSMZTGE>.
You are receiving this because you authored the thread.
|
Troubleshooting
|
Sorry for the lack of attention, I have struggled over the years to commit anytime to this project. I've just published raw-socket 1.8.1 and net-ping 1.2.4, these seem to work with node 20 on my test system (net-ping uses raw-socket):
For existing installations you may need to rebuild certain deps, the key one is raw-socket being 1.8.1. |
@stephenwvickers there still seems to be issues with this on Windows. Is there a way to get this updated to work with Windows as well? When I try to
|
@silverbullettruck2001 it looks like it can’t find your VC installation? |
I tried downgrading the module 'nan' to 2.17 from 2.18 but that didn't help. still getting blocked
trying to get raw-socket in
i tried doing npm install nan, and installing node-gyp, but it still wants to compile the C code for the raw sockets which failes in the nan C code.
MacMini:~ edward$ sudo npm install raw-socket
npm ERR! code 1
npm ERR! path /Users/edward/node_modules/raw-socket
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/raw/src/raw.o
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 | x64
npm ERR! gyp info find Python using Python version 3.7.12 found at "/usr/local/opt/[email protected]/bin/python3.7"
npm ERR! gyp info spawn /usr/local/opt/[email protected]/bin/python3.7
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/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 '/Users/edward/node_modules/raw-socket/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/edward/Library/Caches/node-gyp/20.12.1/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/edward/Library/Caches/node-gyp/20.12.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/edward/Library/Caches/node-gyp/20.12.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/edward/node_modules/raw-socket',
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 spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/raw.cc:6:
npm ERR! In file included from ../src/raw.h:23:
npm ERR! In file included from ../../nan/nan.h:176:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
npm ERR! typedef v8::Localv8::AccessorSignature Sig;
npm ERR! ~~~~^
npm ERR! In file included from ../src/raw.cc:6:
npm ERR! In file included from ../src/raw.h:23:
npm ERR! ../../nan/nan.h:2542:8: error: no matching member function for call to 'SetAccessor'
npm ERR! tpl->SetAccessor(
npm ERR! ~~~~~^~~~~~~~~~~
npm ERR! /Users/edward/Library/Caches/node-gyp/20.12.1/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'imp::Sig' (aka 'int') to 'v8::SideEffectType' for 7th argument
npm ERR! void SetAccessor(
npm ERR! ^
npm ERR! /Users/edward/Library/Caches/node-gyp/20.12.1/include/node/v8-template.h:809:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void ()(v8::Localv8::Name, const v8::PropertyCallbackInfov8::Value &)') to 'v8::AccessorGetterCallback' (aka 'void ()(Localv8::String, const PropertyCallbackInfov8::Value &)') for 2nd argument
npm ERR! void SetAccessor(
npm ERR! ^
npm ERR! 2 errors generated.
npm ERR! make: *** [Release/obj.target/raw/src/raw.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error:
make
failed with exit code: 2npm ERR! gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 18.7.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/edward/node_modules/raw-socket
npm ERR! gyp ERR! node -v v20.12.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
The text was updated successfully, but these errors were encountered: