WSL: os.networkInterfaces error in NodeJS / Yeoman

I managed to successfully install NodeJS, NPM and Yeoman. You see all installed components in the version below.

screen shot 2016-06-03 at 00 24 33

When create a new project and type. yo <generator-name> Everything works fine. A problem happens when I just try yo. Because Yeoman somehow tries to access the network interfaces of the operation system propably. This won’t work on BashOnWindows because there is no network interface directly included in the Linux Sub System and just use the same network as the host one. screen shot 2016-06-03 at 00 43 44

Am I completely wrong or can this be fixed in future releases? Thanx.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 140
  • Comments: 163 (27 by maintainers)

Commits related to this issue

Most upvoted comments

We are actively implementing this feature now, please stay tuned.

These workarounds are crazy. Simpler to run this before the problem:

// Hack for Ubuntu on Windows: interface enumeration fails with EINVAL, so return empty.
try {
  require('os').networkInterfaces();
} catch (e) {
  require('os').networkInterfaces = () => ({});
}

If you are using a CLI you can generally get it to require a module first with node’s --require flag, eg:

node -r ./uow-hack.js node_modules/.bin/browser-sync.js ....

Others have config options, eg ava has ava.require in package.json

The code for this has been checked in (enabling ‘ip addr’, ‘ip link’), it’ll take some time to make it to the insiders branch.

@framerate Moved to Hackintosh and at this time a lot laptop easy to switch. My laptop work much faster on Sierra than on W10. In future looking to by real Mac. Were windows user and dev for 22 year. Bye @microsoft

@aseering unfortunately, this isn’t a workaround, nor fix, since it breaks the application. Its like saying “when your car doesn’t steer correctly, remove the steering wheel”

I’ve hit the issue with os.networkInterfaces(), and I’ve found a workaround (though it’s ugly):

  • Look at the stack trace to determine what direct package is causing this issue. Note that it’s probably not the package that you’re trying to run; it’s probably a dependency of that package. @StfBauer , it looks like your problem is in npmconf (same as me). @abhishek1214 @simonknittel @afdallah , it looks like all of you are hitting a problem in the dev-ip module.
  • Look inside ~/.npm/<packagename>/<version>/. (If multiple versions are available, you probably want to update all of them? Though for me there was only one version.) You should see a directory named package and a file named package.tgz
  • Look inside the directory named package; you should be able to find the exact .js file where the failure in your stack trace is occurring. Make a backup copy of that file somewhere so you can revert your changes if necessary.
  • Open that file in your favorite Linux text editor. Replace all calls to os.networkInterfaces(), require("os").networkInterfaces(), etc with just {}. (Do this intelligently, not blind search-and-replace – make sure the file continues to be syntactically-valid JavaScript.) This will cause the script to not see metadata for any network interfaces, which might cause problems in some applications, but WSL isn’t providing that metadata right now anyway.
  • Save the file. Exit your text editor.
  • Run cd .. as necessary to get yourself back to ~/.npm/<packagename>/<version>/. Run the following command to re-create the .tgz file: tar czvf package.tgz package
  • Go back to your project. Re-run npm install. You might need to remove your whole node_modules directory and reinstall.

Anyway, I think that gets all the steps? This is definitely not a polished solution; it would be great if someone with a little more node experience than I could give it a try and report back on what other hackery they needed to do.

This fix is in the latest insider build for the fast ring, 14965. https://msdn.microsoft.com/en-us/commandline/wsl/release_notes

We are looking into supporting NETLINK and RAW sockets. It’s difficult to give any ETA at the moment.

Just wanna say, that BrowserSync propably fails because of the same reason:

/mnt/e/wsl/repos/static-site-generator/node_modules/dev-ip/lib/dev-ip.js:21
    var networkInterfaces = require("os").networkInterfaces();
                                          ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at getIp (/mnt/e/wsl/repos/static-site-generator/node_modules/dev-ip/lib/dev-ip.js:21:43)
    at Object.<anonymous> (/mnt/e/wsl/repos/static-site-generator/node_modules/browser-sync/lib/utils.js:4:38)
    at Module._compile (module.js:541:32)
    at Module._extensions..js (module.js:550:10)
    at Object.require.extensions.(anonymous function) [as .js] (/mnt/e/wsl/repos/static-site-generator/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/e/wsl/repos/static-site-generator/node_modules/browser-sync/lib/snippet.js:9:20)
    at Module._compile (module.js:541:32)
    at Module._extensions..js (module.js:550:10)
    at Object.require.extensions.(anonymous function) [as .js] (/mnt/e/wsl/repos/static-site-generator/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)

Everything is up-to-date (Windows, BrowserSync, Node, …)

new statement from microsoft : hfeirsp

I just put up a shim for networkInterfaces() and FSWatcher here. Put it in your node_modules root and require("../../wsl-shim"); at the top of bin/browswer-sync.js, etc. dev-ip and chokidar are none the wiser.

untitled

@miladmostavi, @kokarn, @mateusmedeiros - I appreciate the discussion.

Others have touched on this but I think it’s important to note that WSL is still very much in beta. As far as Microsoft goes we’re in uncharted waters where we shipped an internal Windows component in a half-finished state (intentionally). Personally I think this experiment has hugely paid off because by doing so we’ve gotten a ton of invaluable feedback that we’ve used to make our product even better. I’m very proud of all of the work that has gone into our feature in the last 6 months and think our Creators Update release is going to a huge improvement. Does that mean that we’re done? Absolutely not, but it does mean that we’ll be enabling more developers to use more of the Linux tools that they rely on in their workflow.

I tend to agree with what others have said, that as our compatibility gets closer to native Linux the release cadence of WSL will become a much smaller issue. I also agree that it would be nice to have a faster ship mechanism but there is currently no way for an internal Windows component to be serviced “out of band.”

This is the only thing keeping me on Linux 😦

I understand that this is functionality that a lot of people want but a better place for these “+1’s” is our User Voice page.

Yep, I’m watching this as well. Breaking for me with the package “node-sass”. Running “Bash on Ubuntu on Windows” in the Anniversary Update.

or we can just boot linux and ditech this whole mess… Sorry but it just gets really annoying sometimes.

Yes, this is resolved, as has been commented before and it will take some time before it arrives in the insider preview.

Everyone: Please don’t comment “I also ran into this problem” or “when do I get this???”. There are at least 53 watchers being notified of every time someone clutters the thread with comments. Useful information (“is this being worked on?” / “when is it released?”) disappears between demanding comments.

If you also have come across this issue in your project:

  • Link this issue in your project
  • Subscribe to this issue to get notified when it lands in insider preview / release
  • (optionally) use the workaround by simonbuchan in the mean time

If you just came here to rant about this feature not working or Microsoft in general:

  • Please don’t. It is stated multiple times that bash on windows is still beta software. You wouldn’t want users of your free, beta software to rant and complain about features you already work on.

Thank you.

The simplest way to reproduce this problem:

ryerh@localhost:~/ $ node
> os.networkInterfaces()
Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:270:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:439:10)
    at emitOne (events.js:95:20)
    at REPLServer.emit (events.js:182:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
>

I think you should lock this issue, as it is clearly already in works and all the latest comments are simply the noise that’s not much relevant

I’m not sure a GitHub issue is the right place to complain about this. The problem is already on Microsoft’s radar. There are a bunch of us subscribed to the issue to track resolution and workarounds, and it’s not helpful to see +1s and other unproductive comments.

The workaround posted by @simonbuchan works pretty well for me, I was having this issue with the css-loader from Webpack.

I just placed the temporary fix at the top of my configuration file, like so…

// Hack for Ubuntu on Windows: interface enumeration fails with EINVAL, so return empty.
try {
  require('os').networkInterfaces()
} catch (e) {
  require('os').networkInterfaces = () => ({})
}

// Dependencies
const glob = require('glob')

module.exports = {
  entry: glob.sync('./app/**/*.js'),
  output: {
    path: 'build',
    filename: 'bundle.js'
  } ...

It would be great to have a “real” solution though for this issue!

+1

I gave up and I am using Mac now 😞

I’m going to be honest here. With once a year updates, this thing will never be viable as a development environment. This issue has prevented webpack development without workarounds. Maybe other issues come up in the future, I think there should be more regular updates to normal windows builds, not just insider updates. The package is clearly labeled as beta, so users could expect breaking changes, but I think it will be worth it in the long run.

this is beta i.e. “bettah than nothing”. This guys here are doing an amazing job on fixing things asap, something that you rarely see in corporations of this scale. This place is a truly precious gem of developer-user communication, don’t spoil it with your demands and complaints

@LFeh Patience is a virtue 😉 We hear you loud and clear - bear with us!

Rest assured that the team is working hard to figure out a solution to this and many other issues: Some issues simply take longer to fix and bake than others.

While it’s tempting to do so, please refrain from filling up comment threads with +1’s, etc. Instead, vote on the Op’s post using the thumbs/smiley “reactions” that GitHub has to thoughtfully provided for us to use 😉

I’ve met this problem while using webpack to bundle css files.

problem

What I do is just import '/path/to/cssfiles'; which succeed without BashOnWindows.

Running netsh interface teredo set state disabled in a privileged shell prompt fixed the problem for me! Running ip addr now prints my network interfaces, and after clearing and reinstalling my node_modules i was finally able to start my app. Thanks @JasonLinMS and everyone else! Hopefully we’ll see that teredo fix released soon because it makes me uncomfortable leaving it disabled. 💯

@johnnyoshika @LFeh @daniandl et al. Take note of @JasonLinMS comment here: https://github.com/Microsoft/BashOnWindows/issues/468#issuecomment-251298565:

“We are actively implementing this feature now, please stay tuned”

It’s hard to give estimates of when this feature will be built and tested internally, and when it’ll eventually bubble up to Insiders builds, but rest assured the team are actively working to fix this issue and will get it into Insiders builds as soon as it’s stable.

Just have to voice my opinion on this, because even tho I’m in the same boat as you I don’t agree at all. Yes, I’m as frustrated as you that issues such as this and file watchers hinder a lot of modern development.

It is however labelled as beta very prominently and quite hard to enable, so it’s obviously a very early feature.

It’s only been in the wild since august (6 months) and the next update scheduled for April should include all the fixes needed.

OFC I can understand the sentiment that they should’ve waited longer before releasing it but I’d rather have early access to beta features that doesn’t quite work than wait another 6 months just to get a taste.

Woohoo, progress! Soon I’ll be able to switch to WSL for my node apps

I can confirm that Creators Update is solve the issue. ifconfig and ip addr show works just fine,

$ feryardiant at Mimin-Zenbook in ~
[12:38:04] → ifconfig
eth1      Link encap:Ethernet  HWaddr 0a:00:27:00:00:02
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::3411:3e51:18ca:2394/64 Scope:Unknown
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth2      Link encap:Ethernet  HWaddr 0a:00:27:00:00:07
          inet addr:192.168.99.1  Bcast:192.168.99.255  Mask:255.255.255.0
          inet6 addr: fe80::ac6f:9be5:bf8:2298/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Global
          UP LOOPBACK RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:UNSPEC  HWaddr 10-02-B5-52-3F-CD-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f56d:7300:e95d:d95/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


$ feryardiant at Mimin-Zenbook in ~
[12:38:08] → ip addr show
8: eth0: <> mtu 1500 group default qlen 1
    link/ether 00:ff:ce:91:fd:d4
    inet 169.254.236.98/16 brd 169.254.255.255 scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::347d:e364:27e4:ec62/64 scope global dynamic
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ether 0a:00:27:00:00:02
    inet 192.168.56.1/24 brd 192.168.56.255 scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::3411:3e51:18ca:2394/64 scope link dynamic
       valid_lft forever preferred_lft forever
7: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ether 0a:00:27:00:00:07
    inet 192.168.99.1/24 brd 192.168.99.255 scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::ac6f:9be5:bf8:2298/64 scope global dynamic
       valid_lft forever preferred_lft forever
1: lo: <LOOPBACK,UP> mtu 1500 group default qlen 1
    link/loopback 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope global dynamic
       valid_lft forever preferred_lft forever
6: wifi0: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
    link/ieee802.11 10:02:b5:52:3f:cd
    inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic
       valid_lft 86345sec preferred_lft 86345sec
    inet6 fe80::f56d:7300:e95d:d95/64 scope global dynamic
       valid_lft forever preferred_lft forever
4: wifi1: <> mtu 1500 group default qlen 1
    link/ieee802.11 10:02:b5:52:3f:ce
    inet 169.254.113.41/16 brd 169.254.255.255 scope global dynamic
       valid_lft forever preferred_lft forever
    inet6 fe80::81f2:d837:a9ec:7129/64 scope global dynamic
       valid_lft forever preferred_lft forever

also my npm run build is working now.

$ feryardiant at Mimin-Zenbook in personal/codes/laravel-project on git:testing ●
[12:41:56] → npm run build

> @ build /mnt/d/Workspaces/personal/codes/laravel-project
> node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 95% emitting

 DONE  Compiled successfully in 14380ms                                                                      12:42:39
                                                                                                                       Asset       Size  Chunks                    Chunk Names
  assets/js/admin.js     301 kB       0  [emitted]  [big]  assets/js/admin
    assets/js/web.js     301 kB       1  [emitted]  [big]  assets/js/web
assets/css/admin.css   23 bytes    0, 0  [emitted]         assets/js/admin, assets/js/admin
  assets/css/web.css  519 bytes       0  [emitted]         assets/js/admin
   mix-manifest.json  194 bytes          [emitted]

Considering to remove babun from my PC 🤔

Thanks @benhillis

Sorry I don’t want to offend anyone (if someone takes it personal) - it’s just frustration with bash. I’ve started using it for projects - but now I need to go back to virtual machines because of this bug…

I cannot see inside the issue - but it looked quite straightforward - maybe it’s not.

But as I understand this project is developed by MS and it’s normal software (bash as part of it) which you can buy and develop on, so please don’t say that it may be crappy because it’s free software… and I forget that bash is still in Beta - that mark may be an excuse for this 😃

So please keep up the good work on bash. And please stop off-topic discussion - I don’t want to start this.

It’s really sad that so critical bug is not fixed promptly - it’s even not fixed in months. I really liked BASH for windows but with instability like this it’s better to have always virtual machine, or it may be even better to work in linux directly.

@lamo2k123 @seungha-kim I don’t think +1 has any effect on things, please upvote this issue on the user forms on the wsl microsoft page so they will see it and your voice can be heard!

+1 provides no real information and can be annoying.

How can I upgrade bashOnWindows? I can’t even to see my ifconfig:

$ ifconfig
Warning: Can not to open /proc/net/dev (No such file or directory). Limited output.
$

I’m not in the office right now, but I’m guessing it’s 99% because of the “Teredo” interface, which has 32-byte hardware addresses, which we are not handling correctly in lxcore. I actually fixed this bug last week, so it should be hitting insiders really soon. I’ll update this thread tomorrow if I find out if it turns out to be a different issue.

@fongandrew its not unproductive, its just really frustrating to be 95% there and be blocked by something like this. I’m making due somehow by using cgywin on another window and running bash. the file watcher seems to be working for me now which is good.

I’m right there with you guys. Apple has almost zero commitment to their developers it seems (sometimes). Microsoft seems 100% committed in the last 6 months! But this is the major blocker for me.

I bought a windows computer and gave it a shot but without bash I just couldn’t make the switch and I’ve moved back to macOS indefinitely.

We are in October and the problem remains, thus stay hard defend you @Microsoft 😼

#972

Same problem in webpack with css-loader. While we don’t have a solution, i did a workaround. The package uniqid will fallback to process instead of mac address.

//first line of your application
require('os').networInterfaces = function() { return []; };

Cause i am facing the same issue here is my error log

[22:09:50] Requiring external module babel-core/register /mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21 var networkInterfaces = require(“os”).networkInterfaces(); ^

Error: EINVAL: invalid argument, uv_interface_addresses at Error (native) at getIp (/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/node_modules/dev-ip/lib/dev-ip.js:21:43) at Object.<anonymous> (/mnt/c/Users/abhis/WebProjects/emails/cts-report/node_modules/browser-sync/lib/utils.js:4:38) at Module._compile (module.js:541:32) at Module._extensions…js (module.js:550:10) at Object.require.extensions.(anonymous function) as .js at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) Error: foundation-emails-template@1.0.0 start: gulp Exit status 1 at EventEmitter.<anonymous> (/usr/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16) at emitTwo (events.js:106:13) at EventEmitter.emit (events.js:191:7) at ChildProcess.<anonymous> (/usr/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:852:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

My current workaround is shimming the os.networkInterfaces function by shimming node to load my shim file… 😉 I’m replacing the /usr/bin/node symlink to link to an intermediate script file which invokes the real node with an extra -r argument to require a JS file at start, in which I’m replacing the os.networkInterfaces function to return a loopback interface.

I created a bash script which does the dirty work for you: https://github.com/CherryDT/wsl_node_network_interfaces_shim

I hit same issue when using Angular-CLI…

I had a similar problem when trying to run the ionic.

Error getting IPv4 address: Error: EINVAL: invalid argument, uv_interface_addresses (CLI v1.7.15)

@mikaturk

Will this be fixed in the creators update?

Yes, it will be.

Please keep this discourse on this forum respectful. There is no need for personal attacks.

@dreyks I’m not too sure if it should be locked. People have different applications that are running into this issue and I think its helpful to be able to see what applications are and are not being affected; for both testing and future users.

I get this same error when trying to use Ember CLI. I hope this gets fixed soon.

$ ember new myember
/home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:395
  var interfaces = os.networkInterfaces(),
                      ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at /home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:395:23
    at Object.<anonymous> (/home/Johnny/.nvm/versions/node/v6.7.0/lib/node_modules/ember-cli/node_modules/portfinder/lib/portfinder.js:410:2)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

Let’s hope it means that the Devs have prioritized this and don’t need any more advice and we can expect a fix to work its way to use relatively soon?

I’m also facing the same problem when i run gulp. Is there any solution?

I’m waiting for the fix. Meanwhile I switched temporary to git bash for Windows in order to run my node builds. I still have high hopes for Windows Subsystem for Linux feature.

@jonathancalb - Build 1607 is still the Anniversary Update build (14393). You can see that by using the Windows command ver. These fixes are currently only available to Windows Insider builds, but will soon will also be available to Creators Update release.

Closing this out. If anyone is still (on builds 15007+) having problems, please let us know and we can reopen.

@rohn – welcome to Windows and WSL! It may be a bit of a rough ride; this is definitely still beta software. But in my opinion it’s really cool and they’re releasing big improvements on a regular basis.

The issue with Teredo interfaces is only relevant to recent Insider builds. Unfortunately, network-address enumeration simply doesn’t work at all on the current stable Windows version.

The KB things are typically bugfixes; unfortunately, WSL improvements are not being released that way. If you’re running bash and you’re not in the Insider program, the only build that’s available that can do that is build 14393. Updates are only available via the Insider program, which is up to build 14986. They will be rolled into the next Windows major-version release, which I believe is scheduled for next spring sometime.

(For a sense of how far things have come: WSL was first introduced in Insider build 14316. So, the Stable version of WSL is about 70 builds old; the Insider version is about 600 builds old. It has been under continuous active development for that time.)

@vpArth – Updates are available through Windows Update to people who have joined the Insider program: http://insider.windows.com/ Note that Insider builds update all of Windows, not just WSL / Bash on Windows.

Don’t forget that this is free software.

@neoadventist Well the thing is, that Microsoft knows where the problem is and all these comments only repeat those before them. Everyone has essentially the same problem. There is really no need for everyone to comment, as this bug is acknowledged to exist and being worked on.

Can confirm that this still an issue on my system.

$ gulp serve
/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/dev-ip/lib/dev-ip.js:21
    var networkInterfaces = require("os").networkInterfaces();
                                          ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at Error (native)
    at getIp (/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/dev-ip/lib/dev-ip.js:21:43)
    at Object.<anonymous> (/mnt/d/Workspaces/Projek.xyz/Codes/slim-skeleton/node_modules/browser-sync/lib/utils.js:4:38)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)

Currently i’m working with gulp-connect-php and browsersync.

Yes, but a lot of the time it’s some deep package that doesn’t actually need a valid entry and will fallback - eg webpack css-loader is just using it to create hashes for ids!

As per @nmai & @saschagehlich said, I’ve tried this command

> netsh interface teredo set state disabled

On cmd (as Administrator), but still got no luck with either ip addr show and ifconfig

$ feryardiant at MIMIN-ZENBOOK in ~
[11:13:10] → ip addr show
SO_SNDBUF: Invalid argument

$ feryardiant at MIMIN-ZENBOOK in ~
[11:13:13] → ifconfig
Warning: cannot open /proc/net/dev (Tidak ada berkas atau direktori seperti itu). Limited output.

And still having same issue on node js

EINVAL: invalid argument, uv_interface_addresses

Did I need to completely reinstall WSL again? or reboot my PC? or what? 😅

it crowd - restart please


Windows 10 Home 1607 build 14393.969

Hi @micahblu – thanks for posting, but it’s a long thread in part because people keep asking questions that have already been answered 😃 So I hope you’ll understand if I give you a brief answer and direct you to go read the thread.

In short: This problem has been fixed for a while now. The fix is only available in Insider builds, which are much newer than build 14393.

The fix is not being backported; it will ship with the next major version of Windows, which is due out in a few months. There’s lots of discussion about all of this above.

@micahblu It was fixed in build 15007.

Take a look at the tags of this issue: “fixedininsiderbuilds” is among them, indicating that it has been fixed already but is not on any release build yet (which takes months usually). You can get the fix if you join the Windows Insider program to get Insider builds. Once it is on a release build, the tag will be replaced with “fixed”, I believe.

In the meantime, you can check the workaround I posted: https://github.com/CherryDT/wsl_node_network_interfaces_shim

@jumbosushi – if you download and install 15002, 15014 should appear as a Windows Update. It may take 24-48 hours to appear. I unfortunately don’t know of a better way to download it; you’re not the first person to ask…

@sunilmut on the insider program website, the latest available version available is 15002. Where can we download 15007+?

Sorry to ask this after being asked not to, but the last few responses got a little confusing to me, with all the logs. What is the status of this?

I just bought a new machine last week, downloaded automatic updates, enabled bash, and it didn’t work. Is it that there’s anything extra I need to do to get the latest version, or is it - the fix - simply not out yet?

Workaround (which will disable IPv6 support on your machine): Run a cmd as Administrator and run:

netsh interface teredo set state disabled

Afterwards stuff like ip addr show works again

Just got tons of updates. Was hoping to have this fix… but not this time:(

@george-cz Agreed, it was easy to find out that this was not caused by a package and that the issue was with bash on windows. This should be locked.

@bitcrazed, we have no doubt this bug will be fixed eventually. some of us are just trying to figure out fix ETA / roll-out expectancy. three months, half a year, longer?
i’d personally would rather go back to stable build for 6 months as this was the only feature i was interested in.

btw. really appreciate your work.

Yep @framerate, I was waiting with anxiety the Bash and I am completely disappointed because it does not work with my workflow (basically Node, Gulp, Browser Sync, React, etc).