Page MenuHomePhabricator

Add node 6 compatibility to Portal build tasks
Closed, ResolvedPublic

Description

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:

/path/to/portals/node_modules/preq/index.js:21
        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 wiktionary.org
[12:56:35] Using gulpfile ~/Wikimedia/portals/gulpfile.js
[12:56:35] Starting 'fetch-meta'...
[12:56:35] Finished 'fetch-meta' after 68 ms
buffer.js:257
  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

Jdrewniak created this task.Nov 7 2016, 5:20 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2016, 5:20 PM
Jdrewniak updated the task description. (Show Details)Nov 7 2016, 5:26 PM
debt updated the task description. (Show Details)Nov 7 2016, 6:27 PM
debt added a subscriber: GWicke.
debt triaged this task as Normal priority.Nov 8 2016, 4:39 PM
debt moved this task from Backlog to In Progress on the Discovery-Portal-Sprint board.
Jdrewniak updated the task description. (Show Details)Nov 9 2016, 12:08 PM

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

https://gerrit.wikimedia.org/r/314592

mxn added a subscriber: mxn.Nov 10 2016, 4:09 PM
debt added a comment.Nov 29 2016, 4:34 PM

This check-in was updated: https://gerrit.wikimedia.org/r/#/c/314592/ but somehow gerrit didn't update this ticket automatically.

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

https://gerrit.wikimedia.org/r/314592

MarcoAurelio closed this task as Resolved.Dec 5 2016, 5:34 PM
MarcoAurelio moved this task from Needs code review to Done on the Discovery-Portal-Sprint board.
Fjalapeno moved this task from To Do to Done on the Offline-Working-Group board.