Node.js dont work ---> Error: EFILE at dns.js:249 "this._handle = new ChannelWrap();"
- Version: v8.6.0
- Platform: Windows 8.1
- Subsystem: Node.js
I just downloaded Node.js and installed it, but when I open node.exe it display this error and exits immediatelly. Does anyone could explain what causes it? How to fix this issue, what did i did wrong? Thanks!
dns.js:249
this._handle = new ChannelWrap();
^
Error: EFILE
at new Resolver (dns.js:249:20)
at dns.js:380:25
at NativeModule.compile (bootstrap_node.js:595:7)
at NativeModule.require (bootstrap_node.js:540:18)
at net.js:46:13
at NativeModule.compile (bootstrap_node.js:595:7)
at NativeModule.require (bootstrap_node.js:540:18)
at tty.js:25:13
at NativeModule.compile (bootstrap_node.js:595:7)
at NativeModule.require (bootstrap_node.js:540:18)
I think that's node telling you in a rather oblique way it can't initialize networking (no network configured or network down?)
Try the latest v8.x release and see if it fares better.
Yes, on the computer where I test Node.js it doesn't have internet connection, but why it dont allow me to even start node? Do you want to say that Node requires internet in order to launch?
See https://github.com/nodejs/node/issues/8966. The answer to your question is essentially that no, node.js won't work when networking is completely disabled.
Thank you for explaining. However, you said that
Node.js won't work when networking is completely disabled.
Why? I don't have any network drivers installed on my second computer, but I want to do some offline tests in Node.js, is there any way to achieve it? As I can see this error came from JavaScript environment, not c++, so is there a way to avoid loading dns.js and just use standard Node.js features?
No. It's in the issue I linked to.
As per https://github.com/nodejs/node/issues/8966#issuecomment-318389243, you can try Node.js 9.0.0, it has ares 1.13.0
@bnoordhuis @vsemozhetbyt Thank you for helping! Downloading Node.js version v9.0.0 solved the problem. Node.js now works properly. Feel free to close this issue if you want.
Hello, anyone can give me a sharp solution for this problem.
dns.246: Error: efile bla bla bla
I just simply restart my computer and it all work fine. My node version is 8.9.3