Comments (34)
PR opened to react here: facebook/create-react-app#6483
from default-gateway.
Do you want me to increase the version number in package.json before I create a PR?
No need, I will handle that after merging.
from default-gateway.
3.1.0 released, sindresorhus/internal-ip#20 for downstream support.
from default-gateway.
Seems it's impossible to virtualize AIX on x86 hardware, so I have to pass on supporting it.
from default-gateway.
Hi there,
we‘re having an AIX system (ppc64 architecture) and we‘re interested in making this package available on it. Since this package is a dependency for Angular as well as React, it‘s kind of necessary for us to get it working on our machine, in order to use these frameworks.
So, if you‘re still interested on working on support, please let us know.
from default-gateway.
Can you post the exact output of these commands on a machine that ideally has both IPv4 and IPv6 gateways?
netstat -rn -f inet
netstat -rn -f inet6
from default-gateway.
I‘ll come back on Monday with the results. Thanks!
from default-gateway.
Unfortunately, the netstat command is not available in the AIX terminal.
I tried other commands as well (ifconfig, ip, net stat) but none of them is available.
There's a system command called netstat, but you cannot execute it in the bash ("Command NETSTAT invalid in this environment")
We're currently looking for some solution to access this information in node.
One option might be using IBM/nodejs-itoolkit - but I have to dig into it first.
from default-gateway.
Would like to avoid additional dependencies if possible. Is there a /proc/net/route
and /proc/net/ipv6_route
file maybe?
from default-gateway.
There's a database table qsys2/netstat_route_info where I can find the default gateway. There's a command "db2" available to run sql through the shell. But the statement will throw a "permission denied" exception when I try to just run it in the shell.
It might work if I run it with the proper package. I'm working on some prototype to test this.
What I didn't mention so far: It's actually not a full AIX setup we're using - It's an integrated subsystem inside a System i (also known as AS/400). That's why not all the AIX commands will work here.
from default-gateway.
It took a few moments, but I was able to make an aix.js file that runs on our system (tested with test.js)
You can have a look on it here: https://github.com/patrickhrastnik/default-gateway
Do you want me to increase the version number in package.json before I create a PR?
from default-gateway.
Sorry to say, but I wasn't able to make the aix.js file without any of the packages IBM provides for database access in node...
I added the idb-connector as an optional dependency, thus installing default-gateway won't raise an error if you're installing it on another system but aix.
from default-gateway.
According to this:
https://docs.npmjs.com/files/package.json#optionaldependencies
The difference is that build failures do not cause installation to fail.
from default-gateway.
Yeah, i was reminded of ldapjs/node-ldapjs#451, but as I see now, that failure there is on require
when the optional dependency failed to build, not on the actual build build.
So as long as we guard the require in try ... catch
, we should be fine.
from default-gateway.
from default-gateway.
Is this current version now available in npm, or is there something left/pending? Is it still version 3.0.1, or is it gonna be another release version containing these changes?
Sorry for the dumb question, Idk how things work with npm package contribution.
from default-gateway.
Publishing soon after I finish travis changes. Then the change will need to propagate through the dependency chain. I'll do it for https://github.com/sindresorhus/internal-ip because that one is not depending on v3 yet.
from default-gateway.
Okay, thanks :)
from default-gateway.
This is open again, see #10. I will only accept pure JS support for AIX.
from default-gateway.
I‘m sorry the idb-connector package was kinda a miss... but what about a solution with odbc?
This will involve another dependency as well, but odbc is much more available (and less prone to fail on installation) than the idb-connector.
from default-gateway.
I second @patrickhrastnik's question, but also curious if you would accept the current change if IBM/nodejs-idb-connector#54 gets resolved. Currently, this issue only exists for AIX, and only for the non-IBMi variants of AIX. Once that issue is resolved, we will avoid the compile failures for any AIX
from default-gateway.
I would not accept a native dependency, sorry. What we could do is drop the os
field in package.json which would prevent installation failures on AIX, so react development could still work, even without the module returning anything useful.
from default-gateway.
Ok. We have figured out a game plan for a pure js implementation, and should have it ready within a few days.
from default-gateway.
Great! Generally, the current approach with unspecified os
should make react and friends still work on AIX if they treat the negative result from default-gateway
(and in turn internal-ip
) gracefully.
from default-gateway.
Installs of react-scripts
still fail because of the old internal-ip
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"android,darwin,freebsd,linux,openbsd,sunos,win32","arch":"any"} (current: {"os":"aix","arch":"ppc64"})
(I think this is expected, just documenting a reminder of the upstream changes, as we will want to request version bumps).
webpack-dev-server
installs fine as it pulls in internal-ip 4.1
from default-gateway.
Yes, I assume react-scripts
needs to update to webpack-dev-server
3.2.0 or higher.
from default-gateway.
To implement on mainline AIX, we could parse out the following command: netstat -r -f inet -n
/netstat -r -f inet6 -n
I'd gladly work on this, but it may take me a while to procure a machine for development. That work can be tracked in this (or a separate) issue. In the meantime, I'd love for #11 to land as soon as the new db2util
utility is available.
from default-gateway.
Sounds like a plan. For netstat parsing, you can use the other unixes like sunos.js
as a template. The only difference between them is on which column the gateway entry is.
from default-gateway.
Thanks for landing the PR! Would you like to take the task of the upstream request to webpack-dev-server
? I'd happily do it if you prefer, but I suspect origination from the package maintainer gives the request more legitimacy.
from default-gateway.
No need to update webpack-dev-server
, caret version takes care of it and they updated to [email protected]
already.
from default-gateway.
Upon further inspection, it looks like the sunos implementation can be used as-is for AIX! (I will try to find somewhere to test)
from default-gateway.
ahh, so it's just react-scripts
that needs to pull in a newer webpack-dev-server
from default-gateway.
Yes, exactly, they to update to 3.2.1 or higher.
from default-gateway.
Fixed in eb1bce7 and released as [email protected]
.
from default-gateway.
Related Issues (15)
- idbconnector dependency HOT 7
- On windows if the adaptor name is in Chinese, result.interface failed to parse unicode adaptor name correctly. HOT 4
- Windows: The gateway is not from external card HOT 2
- Support policy-based routing on Linux HOT 1
- Respect metrics on all platforms
- Code improvements HOT 1
- node version broken
- Parse /proc instead of forking to ip for linux HOT 1
- "interface" is a strict mode reserved keyword HOT 2
- require don't work well in windows electron HOT 2
- Can't get IP Address on Windows 11 HOT 7
- Intention to deprecate this module
- Unsupported platform FreeBSD HOT 12
- Question about docs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from default-gateway.