-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os.cpus: Cannot read property 'length' of undefined #25483
Comments
See #19022 (comment). |
going to open a PR to resolve this issue |
2 tasks
Fixed in 2b401e3 |
BridgeAR
pushed a commit
that referenced
this issue
Jan 16, 2019
For an unsupported OS, a call to os.cpus() throws an error within os.cpus() itself where it tries to get the length of it. This fixes the issue by adding fallback for undefined CPUs. Fixes: #25483 PR-URL: #25493 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this issue
Jan 16, 2019
For an unsupported OS, a call to os.cpus() throws an error within os.cpus() itself where it tries to get the length of it. This fixes the issue by adding fallback for undefined CPUs. Fixes: nodejs#25483 PR-URL: nodejs#25493 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this issue
Jan 17, 2019
For an unsupported OS, a call to os.cpus() throws an error within os.cpus() itself where it tries to get the length of it. This fixes the issue by adding fallback for undefined CPUs. Fixes: nodejs#25483 PR-URL: nodejs#25493 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This was referenced Aug 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
v11.6.0
Linux localhost 4.9.96-g641303d-ab5108637 #0 SMP PREEMPT Fri Nov 2 19:33:38 UTC 2018 aarch64 Android
os
Steps to reproduce
Termux
on Pixel 3 (Android 9)nodejs
viaapt
npm i -g npm
(or any other install command)require('os').cpus()
Problem
require('os').cpus()
throws error.Full log
The text was updated successfully, but these errors were encountered: