Page MenuHomePhabricator

Add node 6 compatibility to Portal build tasks
Closed, ResolvedPublic


npm install fails for the portal on Node v.6

  • An image processor (lwip) used for image compression by the sprity module doesn't build on Node v.6
    • correction: lwip has been updated to work with node 6, but sprity has not updated its dependancy of lwip yet.
  • Some NPM modules are also outdated and cause deprecation warnings.
  • The gulp fetch meta command is also broken, possibly due to an older version of preq, possibly due to gulp-downloader which hasn't been updated and might need replacing.

preq error:

        if (this.options.connectTimeout && !s.connectTimeoutTimer) {

TypeError: Cannot read property 'connectTimeoutTimer' of undefined
    at ConnectTimeoutAgent.createSocket (/path/to/portals/node_modules/preq/index.js:21:46)
    at ConnectTimeoutAgent.Agent.addRequest (_http_agent.js:141:10)
    at new ClientRequest (_http_client.js:147:16)
    at Object.exports.request (http.js:31:10)
    at Object.exports.request (https.js:197:15)
    at Request.start (/path/to/portals/node_modules/request/request.js:746:30)
    at Request.end (/path/to/portals/node_modules/request/request.js:1357:10)
    at end (/path/to/portals/node_modules/request/request.js:574:14)
    at Immediate._onImmediate (/path/to/portals/node_modules/request/request.js:588:7)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

gulp-downloader error:

Jans-MBP:portals jan$ gulp fetch-meta --portal
[12:56:35] Using gulpfile ~/Wikimedia/portals/gulpfile.js
[12:56:35] Starting 'fetch-meta'...
[12:56:35] Finished 'fetch-meta' after 68 ms
  throw new TypeError(kFromErrorMsg);

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at fromObject (buffer.js:257:9)
    at Function.Buffer.from (buffer.js:97:10)
    at new Buffer (buffer.js:76:17)
    at Request.onResponse [as _callback] (/Users/jan/Wikimedia/portals/node_modules/gulp-downloader/index.js:61:19)
    at self.callback (/Users/jan/Wikimedia/portals/node_modules/request/request.js:186:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.start (/Users/jan/Wikimedia/portals/node_modules/request/request.js:746:10)
    at Request.end (/Users/jan/Wikimedia/portals/node_modules/request/request.js:1431:10)
    at end (/Users/jan/Wikimedia/portals/node_modules/request/request.js:566:14)
    at Immediate.<anonymous> (/Users/jan/Wikimedia/portals/node_modules/request/request.js:580:7)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

Note: this is to assist in the offline project where the Portal is being used as a test page.

Event Timeline

debt added a subscriber: GWicke.
debt triaged this task as Medium priority.Nov 8 2016, 4:39 PM
debt moved this task from Backlog to In Progress on the Discovery-Portal-Sprint board.

Change 314592 had a related patch set uploaded (by Jdrewniak):
Adding Node 6 compatibility to dependancies

This check-in was updated: but somehow gerrit didn't update this ticket automatically.

Change 314592 merged by jenkins-bot:
Adding Node 6 compatibility to dependancies