Skip to content

Build fails due to cpus().length === 0 #3191

@AntonPieper

Description

@AntonPieper

I want to install isolated-vm, but when I try to install it, it wants to build. When it tries that, it fails, because make requires a positive integer argument.

make: the '-j' option requires a positive integer argument

argv.push(require('os').cpus().length)

Maybe it would be a good fallback to use 1 in case the length is 0?

require('os').cpus().length || 1
Additional config

To get this error on an android device using termux, you have to install nodejs, ndk-sysroot, make, clang, binutils. Also, a ~/.gyp/include.gypi file has to be created with the following contents:

{
  'variables': {
    'android_ndk_path': ''
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions