-
Notifications
You must be signed in to change notification settings - Fork 301
Open
Labels
Description
The problem
I'm attempting to run lighthouse with the @now/node
builder, and I am running into a problem. Here is the src and logs of the lambda. I believe below is the simplest way to replicate the bug.
The code
// test.js
require('lighthouse')
The command
ncc run test.js
The module resolution warnings
ncc: Module directory "/~/api/node_modules/lighthouse/lighthouse-core/lib/i18n" attempted to require "intl" but could not be resolved, assuming external.
ncc: Module directory "/~/api/node_modules/ws/lib" attempted to require "utf-8-validate" but could not be resolved, assuming external.
ncc: Module directory "/~/api/node_modules/ws/lib" attempted to require "bufferutil" but could not be resolved, assuming external.
The error
...
5837kB [2471ms] - ncc 0.15.2
Error: EBADF: bad file descriptor, fstat
at tryStatSync (fs.js:517:13)
at Object.fs.readFileSync (fs.js:553:3)
at Object.282 (/node_modules/lighthouse/lighthouse-core/report/html/html-report-assets.js:16:1)
at __webpack_require__ (/webpack:bootstrap:19:1)
at Object.180 (/node_modules/lighthouse/lighthouse-core/report/report-generator.js:8:1)
at __webpack_require__ (/webpack:bootstrap:19:1)
at Object.9 (/node_modules/lighthouse/lighthouse-core/runner.js:20:1)
at __webpack_require__ (/webpack:bootstrap:19:1)
at Object.701 (/node_modules/lighthouse/lighthouse-core/index.js:8:1)
at __webpack_require__ (/webpack:bootstrap:19:1)
evalmachine.<anonymous>:1
(function (exports, require, module, __filename, __dirname) { module.exports=function(t,e){"use strict";var r={};function __webpack_require__(e){if(r[e]){return r[e].exports}var n=r[e]={i:e,l:false,exports:{}};t[e].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}function startup(){return __webpack_require__(610)}return startup()}({29:function(t,e,r){t.exports=glob;var n=r(66);var i=r(316);var o=r(978);var s=o.Minimatch;var a=r(831);var c=r(485).EventEmitter;var f=r(589);var u=r(393);var h=r(403);var l=r(109);var p=r(778);var d=p.alphasort;var v=p.alphasorti;var m=p.setopts;var y=p.ownProp;var b=r(200);var _=r(64);var g=p.childrenIgnored;var w=p.isIgnored;var k=r(834);function glob(t,e,r){if(typeof e==="function")r=e,e={};if(!e)e={};if(e.sync){if(r)throw new TypeError("callback provided to sync glob");return l(t,e)}return new Glob(t,e,r)}glob.sync=l;var E=glob.GlobSync=l.GlobSync;glob.glob=glob;function extend(t,e){if(e===null||typeof e!=="object"){return t
TypeError: process.off is not a function
at ChildProcess.exit (evalmachine.<anonymous>:1:31377)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
paulogdm