From owner-freebsd-ports-bugs@freebsd.org Thu Aug 24 12:49:21 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A14DDEBFF for ; Thu, 24 Aug 2017 12:49:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 275F57697A for ; Thu, 24 Aug 2017 12:49:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7OCnKjg075266 for ; Thu, 24 Aug 2017 12:49:21 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 221762] www/node: undefined require('os').cpus() on aarch64 Date: Thu, 24 Aug 2017 12:49:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: gergely.czuczy@harmless.hu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bhughes@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 12:49:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221762 Bug ID: 221762 Summary: www/node: undefined require('os').cpus() on aarch64 Product: Ports & Packages Version: Latest Hardware: arm64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: bhughes@freebsd.org Reporter: gergely.czuczy@harmless.hu Assignee: bhughes@freebsd.org Flags: maintainer-feedback?(bhughes@freebsd.org) Hello, I've installed npm on an aarch64, -CURRENT, and whatever i'm trying to inst= all, i'm always getting the following: root@aegir:~# npm install -g @angular/cli npm ERR! Cannot read property 'length' of undefined npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-08-23T19_50_05_510Z-debug.log root@aegir:~# less /root/.npm/_logs/2017-08-23T19_50_05_510Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli '@angular/cli' ] 2 info using npm@5.3.0 3 info using node@v8.4.0 4 verbose npm-session 5c14726b0422cde1 5 verbose stack TypeError: Cannot read property 'length' of undefined 5 verbose stack at Object. (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:5:61) 5 verbose stack at Module._compile (module.js:573:30) 5 verbose stack at Object.Module._extensions..js (module.js:584:10) 5 verbose stack at Module.load (module.js:507:32) 5 verbose stack at tryModuleLoad (module.js:470:12) 5 verbose stack at Function.Module._load (module.js:462:3) 5 verbose stack at Module.require (module.js:517:17) 5 verbose stack at require (internal/module.js:11:18) 5 verbose stack at Object. (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/index.js:3:14) 5 verbose stack at Module._compile (module.js:573:30) 5 verbose stack at Object.Module._extensions..js (module.js:584:10) 5 verbose stack at Module.load (module.js:507:32) 5 verbose stack at tryModuleLoad (module.js:470:12) 5 verbose stack at Function.Module._load (module.js:462:3) 5 verbose stack at Module.require (module.js:517:17) 5 verbose stack at require (internal/module.js:11:18) 6 verbose cwd /root 7 verbose FreeBSD 12.0-CURRENT 8 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@angular/cli" 9 verbose node v8.4.0 10 verbose npm v5.3.0 11 error Cannot read property 'length' of undefined 12 verbose exit [ 1, true ] Apparently /usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:5 is t= he culprit: const DEFAULT_OPTIONS =3D { maxCallsPerWorker : Infinity , maxConcurrentWorkers : require('os').cpus().length , maxConcurrentCallsPerWorker : 10 , maxConcurrentCalls : Infinity , maxCallTime : Infinity // exceed this and the who= le worker is terminated , maxRetries : Infinity , forcedKillTime : 100 , autoStart : false Apparently that require('os').cpus().length is the problem, length is undef= ined here. Personally I've replaced it with a 4, as my cpucount is, however it's= not a universal generic workaround. After a suggestion from sunpoet@, the culprit appears to be node: $ node > require('os').cpus().length TypeError: Cannot read property 'length' of undefined at repl:1:21 at ContextifyScript.Script.runInThisContext (vm.js:44:33) at REPLServer.defaultEval (repl.js:239:29) at bound (domain.js:301:14) at REPLServer.runBound [as eval] (domain.js:314:12) at REPLServer.onLine (repl.js:440:10) at emitOne (events.js:120:20) at REPLServer.emit (events.js:210:7) at REPLServer.Interface._onLine (readline.js:279:10) at REPLServer.Interface._line (readline.js:626:8) > require('os').cpus() undefined > aegir@aegir:~/aegir/aegir-ui$ uname -a FreeBSD aegir 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r322723M: Tue Aug 22 19:13:29 CEST 2017=20=20=20=20 toor@marvin.harmless.hu:/tank/rpi3/crochet/work.aegir/obj/arm64.aarch64/tan= k/rpi3/src/sys/AEGIR arm64 Could someone please look into it? Thanks, Gergely --=20 You are receiving this mail because: You are the assignee for the bug.=