marklogic-community / slush-marklogic-node

Slush generator for a MarkLogic/node project
https://github.com/marklogic-community/slush-marklogic-node/wiki
Other
40 stars 28 forks source link

SyntaxError: Use of const in strict mode. #530

Closed grtjn closed 6 years ago

grtjn commented 6 years ago

Another case where dependencies cause old node to break:

.../slush-default/node_modules/gulp-htmlmin/node_modules/bufferstreams/src/index.js:3
const Duplex = require('readable-stream').Duplex;
^^^^^
[08:50:28] 'templatecache' errored after 8.35 ms
[08:50:28] 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 (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (.../slush-default/node_modules/gulp-htmlmin/index.js:3:21)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
grtjn commented 6 years ago

Can be solved temporarily by pinning gulp-htmlmin down to "gulp-htmlmin": "1.1.3" in package.json

grtjn commented 6 years ago

It becomes more and more clear, we should move forward to newer node on current servers.

grtjn commented 6 years ago

Fixing this reveals more issues with gulp-filter and phantomjs-prebuilt. I'm upgrading Node on our CI server to v6..

grtjn commented 6 years ago

We have now migrated to node v4+