npm install feross
TODO
MIT. Copyright (c) Feross Aboukhadijeh.
Better `os.arch()` for node and the browser -- detect OS architecture
License: MIT License
npm install feross
TODO
MIT. Copyright (c) Feross Aboukhadijeh.
This is the latest in a very long and very random line of "screw my project" problems I've been having while trying to build a cross-platform library with NodeJS. The library needs to find the proper Program Files folder based on the OS architecture (Program Files
or Program Files (x86)
) and apparently nothing I do is capable of properly detecting the architecture, including using your module.
At first I thought this was because AppVeyor was installing 32-bit NodeJS on either architecture, but even with that fixed using Install-Product node $env:nodejs_version $env:Platform
to install the proper arch-specific versions it still fails exactly the same as every other time.
I have tried
My detection code is similar to the following:
if (platform === 'win32') {
if (arch === 'x86') {
detected = path.join('C:', 'Program Files')
} else {
detected = path.join('C:', 'Program Files (x86)')
}
}
I have been changing the arch === 'x86'
part around trying different things -- used 'ia32', 'x64', 'x86', 'ia64', and ||
combinations of ia32 & x86, but they all either fail completely or always return one value even on a machine of a different arch. Also, even with it testing for explicit values using if/else if
instead of if/else
it would still always return the value for one arch and ignore the other...lol.
My project is @ https://github.com/l3laze/node-steam-config/tree/new; working in the new branch as it's yet-another-rebuild and I've finally learned to stop doing that directly in a repo/it's dev branch.
I'm guessing this is just going to be something simple that I'm screwing up as usual, but after over 2 days now of trying to fix this I can't keep banging my head against this freaking wall.
Branch | Build failing 🚨 |
---|---|
Dependency | standard |
Current Version | 11.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 91 commits.
ff1a156
authors
17727fc
12.0.0
bdbd248
changelog
3db3a62
https
cf1802c
eslint-plugin-standard ~4.0.0
7d779b8
eslint-plugin-import ~2.14.0
66f676b
eslint ~5.4.0
3933c6b
Use npm versions of eslint shared configs
c00dc66
Use ~ for eslint dep
588d5ab
Add links to French README translation!
aee57b4
ESLint 5
c89d5c7
Merge pull request #1145 from theo4u/patch-1
6477dbf
Merge pull request #1184 from standard/greenkeeper/babel-eslint-9.0.0
8792b9b
Merge pull request #1180 from standard/greenkeeper/eslint-plugin-promise-4.0.0
ff070b8
Merge branch 'master' into greenkeeper/eslint-plugin-promise-4.0.0
There are 91 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
const {bitness} = await navigator.userAgentData.getHighEntropyValues(['bitness']);
See:
Can I create a PR to add esm support?
I have a CLI tool that installs different binaries depending on the system architecture, and it worked fine so far for Windows, macOS and Intel GNU/Linux, but when I tried it on a Raspberry Pi, it installed the x86 binary, which obviously is not the desired effect.
Since Node.js is available on non-Intel architectures too, it would be recommended to support them too, and by all means avoid converting from one architecture to another.
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | standard |
Current Version | 11.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 20 commits.
670a3be
authors
b7e6cbc
11.0.1
34a3c40
Merge pull request #1092 from watson/elastic-logo
5382643
Replace Opbeat with Elastic logo
c40c799
Merge pull request #1091 from mackermans/master
504fcff
docs(README): update typeform logo
a5b779f
Swap README.md and RULES.md symlinks (#1090)
e818224
Merge pull request #1072 from standard/greenkeeper/eslint-plugin-react-7.7.0
9dc888f
Merge branch 'master' into greenkeeper/eslint-plugin-react-7.7.0
a5293dd
Merge pull request #1075 from standard/greenkeeper/eslint-plugin-import-2.9.0
ebf6620
Merge pull request #1087 from standard/greenkeeper/eslint-plugin-promise-3.7.0
116a871
fix(package): update eslint-plugin-promise to version 3.7.0
738edc4
readme: add standard talk
c93ac0d
Merge pull request #1076 from tumobi/fix-links
4f8c1f5
Fix webstorm.md links
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Given the migration to Apple silicon, do not assume that if the platform is 'darwin', the architecture is 'x64'.
This seems a lot simpler and should work just as well?
As you know, process.arch
and require('os').arch()
both return ia32
from a 32-bit Node.js executable.
Assuming running 32-bit Node on 64-bit Linux, the process.arch === 'x64'
test is false and proceeds to do WOW64 checks and those will fail on Linux resulting in incorrectly detecting a 64-bit Linux OS as x86
instead of x64
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.