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

TypeError: Cannot read property 'unref' of undefined #98

Open
kupson opened this issue Jul 3, 2015 · 1 comment
Open

TypeError: Cannot read property 'unref' of undefined #98

kupson opened this issue Jul 3, 2015 · 1 comment

Comments

@kupson
Copy link

kupson commented Jul 3, 2015

Hi,

I spotted another bug in the module:

/.../node_modules/native-dns/lib/pending.js:166
    if (this._socket.unref) {
                    ^
TypeError: Cannot read property 'unref' of undefined
    at SocketQueue._unref (/.../node_modules/native-dns/lib/pending.js:166:21)
    at SocketQueue._onlisten (/.../node_modules/native-dns/lib/pending.js:189:8)
    at emit (events.js:104:17)
    at Socket.<anonymous> (/.../node_modules/native-dns/lib/utils.js:122:12)
    at Socket.emit (events.js:129:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1001:10)

Probably just replacing this line with:

if (this._socket && this._socket.unref) {

would help but there might be a better approach.

Kind Regards,
Rafal Kupka

@Raju568
Copy link

Raju568 commented Apr 13, 2018

By doing these following steps i finally get rid out of this problem.

Upgrade your node version--
Step 1: Clear your cache:
sudo rm -rf /var/lib/apt/lists/*
Step 2: then update :
sudo apt-get update
Step 3: Facing any issue while updating do:
sudo apt-get update -o Acquire::http::No-Cache=True
then try again with : sudo apt-get update
step 4: Switch it to newer version ---
eg: nvm use 7
Step:5 Start your app.

Thanks
Raju Vishwakarma

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

2 participants