silverwind / default-gateway

Get the default network gateway, cross-platform.
86 stars 19 forks source link

Unsupported platform FreeBSD #3

Closed karli-sjoberg closed 7 years ago

karli-sjoberg commented 7 years ago

npm ERR! notsup Unsupported platform for default-gateway@2.0.2: wanted {"os":"darwin,linux,win32","arch":"any"} (current: {"os":"freebsd","arch":"x64"}) npm ERR! notsup Valid OS: darwin,linux,win32 npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: freebsd npm ERR! notsup Actual Arch: x64

A little funny seeing how it´s BSD licensed :)

/K

dmbuga commented 7 years ago

Run into same issue today upon deployng on production server.

As far as I've noticed problem occures when you trying to install 'webpack-dev-server@2.4.4' via NPM.

npm ERR! FreeBSD 11.0-RELEASE-p1 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webpack-dev-server" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for default-gateway@2.0.2: wanted {"os":"darwin,linux,win32","arch":"any"} (current: {"os":"freebsd","arch":"x64"}) npm ERR! notsup Valid OS: darwin,linux,win32 npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: freebsd npm ERR! notsup Actual Arch: x64

silverwind commented 7 years ago

Parsing routing tables is very OS-specific, so this is intentional right now, but I'll see about adding support for FreeBSD.

karli-sjoberg commented 7 years ago

Den 14 sep. 2017 6:43 em skrev silverwind notifications@github.com:Parsing routing tables is very OS-specific, so this is intentional right now, but I'll see about adding support for FreeBSD.Don't feel pressured to do this all by yourself, the Beastie Boys are herr to help:) Please give me clear instructions on how to make a pull request (git novice) and I'll whip something up!/K

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

silverwind commented 7 years ago

http://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html should get you started on the pull request workflow.

As for changes in this repository: I'd suggest you cp linux.js freebsd.js and start working on freebsd.js. After you're done, add freebsd here https://github.com/silverwind/default-gateway/blob/8657070485d3b68dd258110899a2fe5527f106f0/index.js#L5 and in package.json. Also make sure that make test completes without error.

karli-sjoberg commented 7 years ago

On fre, 2017-09-15 at 13:32 +0000, silverwind wrote:

http://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandl inegit.html should get you started on the pull request workflow. As for changes in this repository: I'd suggest you cp linux.js freebsd.js and start working on freebsd.js. After you're done, add freebsd here https://github.com/silverwind/default- gateway/blob/8657070485d3b68dd258110899a2fe5527f106f0/index.js#L5 and package.json. Also make sure that make test completes without error.

Alrighty, I´ll take a stab at it and see what that brings!

/K

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

silverwind commented 7 years ago

It just occured to me that you might have an easier time starting off from darwin.js because both macOS and FreeBSD have BSD roots.

karli-sjoberg commented 7 years ago

Den 15 sep. 2017 6:44 em skrev silverwind notifications@github.com:It just occured to me that you might have an easier time starting off from darwin.js because both macOS and FreeBSD have BSD roots.Yes, a lot macOS userland is FreeBSD. I'll have a look and see if anything fits, thanks!/K

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

edwjusti commented 7 years ago

I am getting the same error here when trying to install webpack-dev-server on an android environment. The ip command is available on android, so it would run without any problem on android.

silverwind commented 7 years ago

@edwjusti do you know what os.platform returns on Android?

Nevermind, it's 'android'. I'll handle it the same as Linux, hope you can let me know if it worked.

silverwind commented 7 years ago

@edwjusti added Android with v2.1.0.

edwjusti commented 7 years ago

Everything is working fine now, thank you for the android addition 😀

silverwind commented 7 years ago

FreeBSD is now supported as of v2.2.0.