microsoft / uf2-samdx1

USB Mass Storage bootloader (based on UF2) for SAMD21 and SAMD51
Other
251 stars 309 forks source link

node v4.2.1 strict complaint #9

Closed ladyada closed 7 years ago

ladyada commented 7 years ago

heya just tried to build and got

node scripts/gendata.js build/metro uf2-bootloader.bin
C:\Users\ladyada\Documents\Projects\atmel\Bootloader\microsoft-uf2-samd21\script
s\gendata.js:2
let fs = require("fs")
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet sup
ported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
    at node.js:961:3
make: *** [build/metro/selfdata.c] Error 1

fixed by adding "use strict" on the first line of gendata.js - @mmoskal let me know if you want me to commit this

mmoskal commented 7 years ago

Please do commit. I guess we could also require a newer node version.

ladyada commented 7 years ago

done

mmoskal commented 7 years ago

Thanks!