-
assigned issue to
Skip Build Unless Installing on IBM i
I work on a package that installs on multiple platforms, including IBM i. I've put idb-connector under optionalDependencies in my package.json -- this allows NPM to proceed with installing my package on non-IBM i platforms, where idb-connector obviously does not work. Programming logic in my package then selects the appropriate database connector for the appropriate platform.
This allows me to install on any platform, but I get a lot of unnecessary output and error messages when installing on non-IBM i platforms because NPM goes through the motions of trying to build idb-connector. To see what I mean, try 'npm install profoundjs' on a Windows PC.
I'm wondering if it's possible to set up so that NPM does not try to build/install idb-connector unless installing on IBM i.
Maybe it's just a matter of setting the 'os' key in idb-connector's package.json?
Comments (6)
-
Account Deactivated -
Account Deactivated The host operating system is determined by
process.platform
which currently returnaix
on IBM i. So the AIX system will still install it ( while many other os not). We may let it return the true os name in future Node.js releases. But for now, seems we can only useaix
to distinguish. -
Account Deactivated commit 6a16b3b
-
reporter Thanks, this will be a nice improvement! I'll try it out when it's released.
-
reporter - changed status to resolved
Much improved, thanks!
-
Account Deactivated Hello @DavidRusso,
We have moved the project to GitHub --> https://github.com/IBM/nodejs-idb-connector
You may report issues there from now on.
- Log in to comment