Skip to content
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

Module not found: Can't resolve './build/Release/raw' #50

Closed
ras24 opened this issue Feb 17, 2018 · 5 comments
Closed

Module not found: Can't resolve './build/Release/raw' #50

ras24 opened this issue Feb 17, 2018 · 5 comments

Comments

@ras24
Copy link

ras24 commented Feb 17, 2018

Hello,
I want to run the node-net-ping with reactjs and i make it with create-react-app v1.5.1.
The node-net-ping i install with npm and then i use the code below to make ping test :

var ping = require ("net-ping");
var session = ping.createSession ();

session.pingHost ("8.8.8.8", function (error, target) {
if (error)
console.log (target + ": " + error.toString ());
else
console.log (target + ": Alive");
});`

But the process end with error below :
./node_modules/raw-socket/index.js
Module not found: Can't resolve './build/Release/raw' in '/Users/me/Desktop/nodenetping/node_modules/raw-socket'

I'm using Nodejs v8.9.4 & npm v5.6.0 on macOS Sierra v10.12.6

@stephenwvickers
Copy link
Collaborator

Are you attempting to use net-ping in the browser?

@ras24
Copy link
Author

ras24 commented Feb 26, 2018

Thank you for your reply.
Yes, i want to show ping result in the browser.
Now i have done with install net-ping in express.js not in react js and send the ping value to react js and it works.

Can i make a request?
I think this library will be good if you can add mtr (my traceroute)
That's the good ping and traceroute combination.

I hope you can thinking about them.
Thank you very much.

@stephenwvickers
Copy link
Collaborator

Hi @ras24,

I am not sure what specific functionality you are looking for, but you could probably get quite a lot of functionality via the existing traceRoute() function.

You could always implement the functionality and open a patch request :D

Steve

@YashKharel19
Copy link

Hello,
Same problem occurred can you help me with issue.
Thanks!

@stephenwvickers
Copy link
Collaborator

@YashKharel19 This module is not supported to run in the browser. It requires native code which is compiled during installation which will not work in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants