friedrith / node-wifi

📶 NodeJS tool to manage wifi (connections, scans)
MIT License
397 stars 161 forks source link

cannot find module "child_process" #6

Closed Ashish1611 closed 7 years ago

Ashish1611 commented 7 years ago

actually i start using node-wifi javascript libraries in angular 2 but i am getting error cannot find module "Child_process" so can you help me how i can use this library in angular 2. urgent

friedrith commented 7 years ago

Euh, node-wifi is a node.js module so it cannot be used for fronted in browser. Even with some help like browserify, I doubt it works because node-wifi uses command lines.

Ashish1611 commented 7 years ago

then how we will run it in angular

friedrith commented 7 years ago

You cannot. It is not intended for this. This module is useful for node scripts or desktop applications in nodejs. Maybe you could explain me what is the use case so I could help you.

Ashish1611 commented 7 years ago

i want to create app which can be display the wifi devices near you....

friedrith commented 7 years ago

What is your framework ? Electron, node-webkit ?

Ashish1611 commented 7 years ago

ionic 2 framework and first i want to test this feature on browse.

Ashish1611 commented 7 years ago

node-wifi

friedrith commented 7 years ago

I don't know how node-webkit works but you should be able to use node.js in a specific thread. The problem doesn't come from our module which is specifically adapted for node environment. That's your job to find a node environment in your framework.

Ashish1611 commented 7 years ago

Euh ,okkk

friedrith commented 7 years ago

Sorry I made a mistake, I used several times the term node-wifi instead of node-webkit.

friedrith commented 7 years ago

But I can ensure you that you cannot use node-wifi in the browser. It would be a significant security breach if you could because we use command lines. It is possible in some framework like electron even in the ui thread but it is not possible in simple browser.

Ashish1611 commented 7 years ago

so, can you provide me names of libraries which i can use in simple browsers also for wifi. because i found some of the libraries which can run in simple browsers also.because is at this state i change my framework from ionic 2 to electron is quiet difficult and time consuming

friedrith commented 7 years ago

Sorry guy but I don't have the time to do your job. This module works very well for full node environment (I thought it will obvious because of the name of the module) for Windows, MacOS and Linux (but not Android or iOS). For other environments try to find something else because we don't support them. I doubt you can find a wifi library working in a simple browser because as I already told you : "It would be a significant security breach" but if you already found one working with ionic, perfect use it.

Ashish1611 commented 7 years ago

Ehhu, ok

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.