You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
os.networkInterfaces error in NodeJS / Yeoman #468
I managed to successfully install NodeJS, NPM and Yeoman. You see all installed components in the version below.
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.
Am I completely wrong or can this be fixed in future releases? Thanx.
Reacted by Peter Juras, Thomas Gmelig Meyling, Antonio Pires, Amosvista, Kenneth Chung, José Gordillo, Gurpreet Atwal, Jake Davies, Quintin Knudsen, Justin Chase and 110 more
Reacted by Joel Duvall, Jack Valentine, Aliaksandr Zhukau and Pedro H. Santiago
Reacted by Valorad the Oneiroseeker, Jack Valentine, Todd Gardner, Aliaksandr Zhukau and Pedro H. Santiago
Reacted by 枯藤新芽, Micheal Colhoun, seungha-kim, Fern 🌿☕️, Felipe Fialho, Jack Valentine, Dan Farcas, Stuart, Aliaksandr Zhukau, Thiago Sciotta and 1 more
Stefan Bauer (@StfBauer) - If you can grab a strace of the failing command 'yo', we can see where it is failing and if it is tripping on something that is currently unimplemented. Thanks for trying out WSL!
socket(PF_NETLINK, SOCK_RAW, 0) = -1 EINVAL (Invalid argument)
WSL currently does not support NETLINK sockets. We are using our user voice page to prioritize the things to implement next. Please feel free to up vote this relevant task.
Sunil Muthuswamy (@sunilmut) Thank you for the update. This will be required for the new SharePoint Framework update released by Microsoft. Because it use Yeoman generator to extend SharePoint from Linux, MacOSX as well as Windows.
In this case it would be great to use it from Bash On Windows.
Will add a user voice.
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. (/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: [email protected] start: gulp
Exit status 1
at EventEmitter. (/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. (/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)
Reacted by nascosto, Joao Paulo Ávila, daronwolff, Colby Rogness and Vladlan
We are looking into supporting NETLINK and RAW sockets. It's difficult to give any ETA at the moment.
Reacted by Tylor Steinberger, Manuel Bieh, Mauricio Allende, Nikhil Jha, Kyle McNally, Tobias Thyssen, Carlos Vieira, @vic10us, David Schwendemann, Andrew Fong and 12 more
ubuntu apt-get install npm
run npm err
how to solve?
so bad
root@2NH7VYN4YAJPLYK:~# npm
/usr/share/npm/node_modules/npmconf/config-defs.js:322
Object.keys(os.networkInterfaces()).map(function (nic) {
^
Error: EINVAL, invalid argument
at getLocalAddresses (/usr/share/npm/node_modules/npmconf/config-defs.js:322:18)
at Object. (/usr/share/npm/node_modules/npmconf/config-defs.js:269:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/npm/node_modules/npmconf/npmconf.js:4:18)
at Module._compile (module.js:456:26)
root@2NH7VYN4YAJPLYK:# /usr/bin/node --version
bash: /usr/bin/node: No such file or directory
root@2NH7VYN4YAJPLYK:#
node_modules/@angular/common/src/directives/ng_class.d.ts(48,34): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/aot/compiler.d.ts(44,32): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(342,20): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(344,28): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(346,15): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(348,23): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(350,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(352,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/output/output_ast.d.ts(433,63): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(28,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(22,37): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(11,30): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(22,30): error TS2304: Cannot find name 'Set'.
node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
node_modules/rxjs/Observable.d.ts(74,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: tsc && concurrently "tsc -w" "lite-server"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mukhtar\AppData\Roaming\npm-cache_logs\2018-06-03T08_09_19_261Z-debug.log
Activity
sunilmut commentedon Jun 2, 2016
Stefan Bauer (@StfBauer) - If you can grab a strace of the failing command 'yo', we can see where it is failing and if it is tripping on something that is currently unimplemented. Thanks for trying out WSL!
StfBauer commentedon Jun 3, 2016
Sunil Muthuswamy (@sunilmut) Thank you. Attached the strace to this comment. Hope you find something useful.
Thanx for your great work so far. Love this.
yeoman-error.txt
sunilmut commentedon Jun 3, 2016
socket(PF_NETLINK, SOCK_RAW, 0) = -1 EINVAL (Invalid argument)WSL currently does not support NETLINK sockets. We are using our user voice page to prioritize the things to implement next. Please feel free to up vote this relevant task.
StfBauer commentedon Jun 3, 2016
Sunil Muthuswamy (@sunilmut) Thank you for the update. This will be required for the new SharePoint Framework update released by Microsoft. Because it use Yeoman generator to extend SharePoint from Linux, MacOSX as well as Windows.
In this case it would be great to use it from Bash On Windows.
Will add a user voice.
StfBauer commentedon Jun 4, 2016
Added entry to user voices:
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/14605521-add-netlink-socket-support
cadupedroni commentedon Jun 15, 2016
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)
abhishek1214 commentedon Jun 29, 2016
Has this been fixed?
abhishek1214 commentedon Jun 29, 2016
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. (/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: [email protected] start:
gulpExit status 1
at EventEmitter. (/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. (/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)
nicole-ashley commentedon Jun 30, 2016
Stefan Bauer (@StfBauer): I don't know for sure, but could the UserVoice suggestion you created be a duplicate of https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13383789-enable-network-interface-enumeraration?
JWo1F commentedon Jul 1, 2016
Hi! When it will be done? :)
sunilmut commentedon Jul 5, 2016
We are looking into supporting NETLINK and RAW sockets. It's difficult to give any ETA at the moment.
afdallah commentedon Jul 19, 2016
I'm also facing the same problem when i run gulp. Is there any solution?
simonbuchan commentedon Jul 22, 2016
Just a note on current build
14393this now gets to thebindcallnicole-ashley commentedon Jul 22, 2016
Woohoo, progress! Soon I'll be able to switch to WSL for my node apps
146 remaining items
feryardiant commentedon Apr 6, 2017
No updates yet, unfortunately
benhillis commentedon Apr 6, 2017
Yes you can download now: https://www.microsoft.com/en-us/software-download/windows10ISO
feryardiant commentedon Apr 6, 2017
Okay Ben Hillis (@benhillis), I'll try it and will back to you.
feryardiant commentedon Apr 6, 2017
I can confirm that Creators Update is solve the issue.
ifconfigandip addr showworks just fine,also my
npm run buildis working now.Considering to remove babun from my PC 🤔
Thanks Ben Hillis (@benhillis)
SFLAQiu commentedon Sep 5, 2017
ubuntu apt-get install npm
run npm err
how to solve?
so bad
root@2NH7VYN4YAJPLYK:~# npm
/usr/share/npm/node_modules/npmconf/config-defs.js:322
Object.keys(os.networkInterfaces()).map(function (nic) {
^
Error: EINVAL, invalid argument
at getLocalAddresses (/usr/share/npm/node_modules/npmconf/config-defs.js:322:18)
at Object. (/usr/share/npm/node_modules/npmconf/config-defs.js:269:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/npm/node_modules/npmconf/npmconf.js:4:18)
at Module._compile (module.js:456:26)
root@2NH7VYN4YAJPLYK:
# /usr/bin/node --version#bash: /usr/bin/node: No such file or directory
root@2NH7VYN4YAJPLYK:
mikaturk commentedon Sep 5, 2017
SFLYQ (@SFLAQiu)
You need to apt-get install node first
aseering commentedon Sep 5, 2017
SFLYQ (@SFLAQiu) -- what version of Windows do you have? (Run
verat a Windows Command Prompt, and copy/paste its output here.) Is it version 14393?That particular error should have been fixed in Windows build 15007. You can get a newer version through Windows Update.
SFLAQiu commentedon Sep 6, 2017
Adam Seering (@aseering) my windows os version is 14393,I'll try it out
SFLAQiu commentedon Sep 6, 2017
Mika Turk (@mikaturk) I've installed node
SFLAQiu commentedon Sep 6, 2017
have new question
I remove apt-get node and npm
then install nvm
nvm install success and nvm install stable already
root@2NH7VYN4YAJPLYK:/# nvm use 8
Now using node v8.4.0 (npm v5.3.0)
root@2NH7VYN4YAJPLYK:/# node -v
v8.4.0
root@2NH7VYN4YAJPLYK:/# npm -v
5.3.0
root@2NH7VYN4YAJPLYK:/# nvm list
-> v8.4.0
node -> stable (-> v8.4.0) (default)
stable -> 8.4 (-> v8.4.0) (default)
iojs -> N/A (default)
root@2NH7VYN4YAJPLYK:/#
but i restart bash,cmd node
root@2NH7VYN4YAJPLYK:/# node
The program 'node' can be found in the following packages:
Try: apt-get install
root@2NH7VYN4YAJPLYK:/# node -v
The program 'node' can be found in the following packages:
Try: apt-get install
root@2NH7VYN4YAJPLYK:/#
need again to nvm use
why?
phsantiago commentedon Nov 19, 2017
Fixed in this release https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/
Update your windows.
MukhtarAsorori commentedon Jun 3, 2018
Is there any body can tell me how can fix this problem.
`D:\LSTU\LearnMySelf\web\Angular2\Angular2_GettingStarted\APM>npm start
node_modules/@angular/common/src/directives/ng_class.d.ts(48,34): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/aot/compiler.d.ts(44,32): error TS2304: Cannot find name 'Map'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(342,20): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(344,28): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(346,15): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(348,23): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(350,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/compile_metadata.d.ts(352,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/compiler/src/output/output_ast.d.ts(433,63): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(28,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(22,37): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(11,30): error TS2304: Cannot find name 'Set'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(22,30): error TS2304: Cannot find name 'Set'.
node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
node_modules/rxjs/Observable.d.ts(74,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start:
tsc && concurrently "tsc -w" "lite-server"npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mukhtar\AppData\Roaming\npm-cache_logs\2018-06-03T08_09_19_261Z-debug.log
D:\LSTU\LearnMySelf\web\Angular2\Angular2_GettingStarted\APM>`
dreyks commentedon Jun 3, 2018
update to the latest Node version