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

nvm net.js error after 15031 #1683

Closed
ztrange opened this Issue Feb 9, 2017 · 16 comments

Comments

Projects
None yet
10 participants
@ztrange
Copy link

ztrange commented Feb 9, 2017

After updating Windows to 15031 I started seeing the following error when opening a new terminal, because of this line of .bashrc which loads nvm:

export NVM_DIR="/home/ztrange/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
net.js:145
    this._handle.open(options.fd);
                 ^

Error: Unknown system error -25: Unknown system error -25, uv_pipe_open
    at Error (native)
    at new Socket (net.js:145:18)
    at createWritableStdioStream (internal/process/stdio.js:156:16)
    at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
    at module.exports (/home/ztrange/.nvm/versions/node/v6.9.5/lib/node_modules/npm/node_modules/npmlog/node_modules/set-blocking/index.js:2:11)
    at Object.<anonymous> (/home/ztrange/.nvm/versions/node/v6.9.5/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v6.9.5 --silent` to unset it.

The part about the config prefix disappeared after I ran the suggested option, but it again returned the same error without the nvm is not compatible

I already tried updating nvm to latest version and installing latest node with nvm but it's all the same. I also tried installing.

To reproduce I hope it's enough to install nvm and install node latest

FYI, node works (It was failing but I made it work by removing all installed node versions and reinstalling the latest one) but I haven't yet seen that node fails unexpectedly. I'm just reporting that it reports that error when loading nvm.

@sngeth

This comment has been minimized.

Copy link

sngeth commented Feb 9, 2017

I'm seeing this as well. The error also occurs when installing new versions of Node.

/mnt/d/Code/mobile(develop) » nvm install --lts                                                                                          sid@DESKTOP-OETGQPP
Installing latest LTS version.
Downloading and installing node v6.9.5...
Local cache found: $NVM_DIR/.cache/bin/node-v6.9.5-linux-x64/node-v6.9.5-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.9.5-linux-x64/node-v6.9.5-linux-x64.tar.xz
net.js:145
    this._handle.open(options.fd);
                 ^

Error: Unknown system error -25: Unknown system error -25, uv_pipe_open
    at Error (native)
    at new Socket (net.js:145:18)
    at createWritableStdioStream (internal/process/stdio.js:156:16)
    at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
    at module.exports (/home/sid/.nvm/versions/node/v6.9.5/lib/node_modules/npm/node_modules/npmlog/node_modules/set-blocking/index.js:2:11)
    at Object.<anonymous> (/home/sid/.nvm/versions/node/v6.9.5/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v6.9.5` to unset it.

Switching back to the WSL's "system" node of 6.9.5. It also seems to be breaking my particular Rails app which worked perfectly in the last build:

The following error has occured...
Error: #<ExecJS::RuntimeError: net.js:145
    this._handle.open(options.fd);
                 ^

Error: Unknown system error -25: Unknown system error -25, uv_pipe_open
  at Error (native)
  at new Socket (net.js:145:18)
  at createWritableStdioStream (internal/process/stdio.js:156:16)
  at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
  at print (/tmp/execjs20170209-336-251c8js:6647:12)
  at /tmp/execjs20170209-336-251c8js:6661:5
  at require../helpers.exports (/tmp/execjs20170209-336-251c8js:1:102)
  at Object.<anonymous> (/tmp/execjs20170209-336-251c8js:1:120)
  at Module._compile (module.js:570:32)
  at Object.Module._extensions..js (module.js:579:10)
  at Module.load (module.js:487:32)
  at tryModuleLoad (module.js:446:12)
  at Function.Module._load (module.js:438:3)
  at Module.runMain (module.js:604:10)
  at run (bootstrap_node.js:394:7)
  at startup (bootstrap_node.js:149:9)
  at bootstrap_node.js:509:3
@rixrix

This comment has been minimized.

Copy link

rixrix commented Feb 10, 2017

I encountered the same issue, this is after the last build release of Windows insider 15031.0. I'm using nvm due to that I maintain a bunch of backend that only requires a specific version of NodeJS, some were on IoT device which comes with an oldie release of Node going back as far v0.12.x

I'd be grateful if there's a workaround. thanks

Here's my log:

nvm use v4.3.2
net.js:129
    this._handle.open(options.fd);
                 ^

Error: Unknown system error -25: Unknown system error -25, uv_pipe_open
    at Error (native)
    at new Socket (net.js:129:18)
    at createWritableStdioStream (node.js:601:18)
    at process.stdout (node.js:627:16)
    at module.exports (/home/urix/.nvm/versions/node/v4.3.2/lib/node_modules/npm/node_modules/npmlog/node_modules/set-blocking/index.js:2:11)
    at Object.<anonymous> (/home/urix/.nvm/versions/node/v4.3.2/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v4.3.2` to unset it.
@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 10, 2017

Would it be possible for one of you to share an strace of the failing operation? That would help us narrow down what is going wrong.

@soda0289

This comment has been minimized.

Copy link

soda0289 commented Feb 10, 2017

@benhillis

I can reproduce this issue when I try to install an npm package globally.

For example: npm install noop -g

Here is the strace dump:
https://gist.github.com/soda0289/0b10aa24f728e5e9b43f79a88febca82

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 10, 2017

Thanks for sharing. The error is likely coming from one of these three operations:

ioctl(2, TCGETS, 0x7fffe5362030)        = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(9, TCGETS, 0x7fffe5360e60)        = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(1, TIOCGPTN, 0x7fffe53614fc)      = -1 ENOTTY (Inappropriate ioctl for device)
@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 10, 2017

We have identified the issue and the fix has been checked in.

@rixrix

This comment has been minimized.

Copy link

rixrix commented Feb 10, 2017

@benhillis sorry for asking, do we know the timeline when are we going to get the update ? would it be via insider build or lxrun /update ? thank you

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 11, 2017

lxrun /update is only a wrapper for "apt update" and only updates the apt package cache. This is a bug in the driver which will be available in a Windows Insider build in a few weeks.

@rixrix

This comment has been minimized.

Copy link

rixrix commented Feb 11, 2017

@benhillis thanks. I decided to revert to the previous Insider build - which only took at most 5mins. Thanks for all your hard work, will try out the fix once released.

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 11, 2017

No problem! The rollback feature really is great and doesn't get enough credit. It's saved me a couple times as well.

@sebolio

This comment has been minimized.

Copy link

sebolio commented Feb 11, 2017

Same problem. @rixrix @benhillis if I roll back, can I avoid getting 15031 again and still get the next one?

@rixrix

This comment has been minimized.

Copy link

rixrix commented Feb 11, 2017

@sebfindling re: avoid, there's a pause updates option in the advanced options settings, turn it on and you won't get 15031 build for a month I guess. Hope that helps you out. cheers

  • Windows Update -> Update settings -> Advanced options -> Pause Updates

FYI

@XDTZ

This comment has been minimized.

Copy link

XDTZ commented Feb 12, 2017

Here's a minimalistic demonstration of the bug:

user@Machine:~/bug$ node -v
v7.5.0
user@Machine:~/bug$ cat lib/index.js
'use strict';

console.log('text');
user@Machine:~/bug$ node lib
text
user@Machine:~/bug$ node lib | grep text
net.js:148
    this._handle.open(options.fd);
                 ^

Error: Unknown system error -25: Unknown system error -25, uv_pipe_open
    at new Socket (net.js:148:18)
    at createWritableStdioStream (internal/process/stdio.js:156:16)
    at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
    at console.js:100:37
    at NativeModule.compile (bootstrap_node.js:521:7)
    at Function.NativeModule.require (bootstrap_node.js:462:18)
    at get (bootstrap_node.js:250:34)
    at Object.<anonymous> (~/bug/lib/index.js:3:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
@reybango

This comment has been minimized.

Copy link

reybango commented Feb 23, 2017

@benhillis This is still occurring in 15040. Was the driver fix applied to this build or is it coming in a subsequent one?

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Feb 23, 2017

@reybango - I just checked this and the fix made it to the prerelease branch for the 15041 build.

@Dj-jom2x

This comment has been minimized.

Copy link

Dj-jom2x commented Feb 25, 2017

15042 fixed

@sunilmut sunilmut closed this Mar 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment