Syntax error reported in tasks/install.js

34 views
Skip to first unread message

Mike Pence

unread,
May 9, 2017, 1:51:17 PM5/9/17
to OpenLayers Dev
I am getting this error when running `npm install`:

/home/mikepence/proj/openlayers/tasks/build-ext.js:17
      let name = `ol.ext.${ext.name || ext.module}`;
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/mikepence/proj/openlayers/tasks/install.js:1:78)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

Using node v4.2.6 and npm v3.5.2. 

Adding "use strict"; in build-ext.js at line 14 seems to fix that. Should I make a PR for that?

Tim Schaub

unread,
May 20, 2017, 1:36:23 PM5/20/17
to OpenLayers Dev
Please submit a pull request.  We could also recommend that people use Node 6+.

Tim


--
You received this message because you are subscribed to the Google Groups "OpenLayers Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlayers-de...@googlegroups.com.
To post to this group, send email to openlay...@googlegroups.com.
Visit this group at https://groups.google.com/group/openlayers-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlayers-dev/af8abca7-4095-4403-b005-7250cf269971%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages