zooniverse / higgs-hunters-facebook

0 stars 0 forks source link

SyntaxError: Use of const in strict mode #1

Open adammcmaster opened 7 years ago

adammcmaster commented 7 years ago

Build error on Docker Hub:



/app/node_modules/zooniverse-readymade/node_modules/haw/node_modules/imagemin/index.js:2

const fs = require('fs');
^^^^^

SyntaxError: Use of const in strict mode.
  at Module._compile (module.js:439:25)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/app/node_modules/zooniverse-readymade/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Builder.defaultConfig.optimize.{*,**/*}.jpg (/app/node_modules/zooniverse-readymade/node_modules/haw/lib/default-config.coffee:124:18)
  at Builder._optimizeFile (/app/node_modules/zooniverse-readymade/node_modules/haw/lib/builder.coffee:165:15)
  at /app/node_modules/zooniverse-readymade/node_modules/haw/lib/builder.coffee:1:1
  at replenish (/app/node_modules/zooniverse-readymade/node_modules/haw/node_modules/async/lib/async.js:191:21)
  at /app/node_modules/zooniverse-readymade/node_modules/haw/node_modules/async/lib/async.js:208:15
  at Object.async.eachLimit (/app/node_modules/zooniverse-readymade/node_modules/haw/node_modules/async/lib/async.js:168:12)
  at Builder.optimizeFiles (/app/node_modules/zooniverse-readymade/node_modules/haw/lib/builder.coffee:119:14)
  at /app/node_modules/zooniverse-readymade/node_modules/haw/lib/builder.coffee:43:10
  at /app/node_modules/zooniverse-readymade/node_modules/haw/lib/builder.coffee:102:19
  at Object.oncomplete (fs.js:108:15)
eatyourgreens commented 7 years ago

Could be caused by haw updating to 0.6.0 https://github.com/zooniverse/haw/commit/ae0dc90dfd2994ec0174881fd56e6f2994061efc

Maybe fix haw to 0.5.1, but we found that version had stopped installing/building because of the outdated image-min module that it depended on.

eatyourgreens commented 7 years ago

Caused by an outdated node. Readymade doesn't support node 0.10, as of 1.3 at least. Upgrading to a recent version should fix this.

adammcmaster commented 7 years ago

Will this work on Node 7.7?

eatyourgreens commented 7 years ago

Should do, but I've only tested that it builds with 6.9.1.