dthree / wat

Instant, central, community-built docs
MIT License
495 stars 25 forks source link

SyntaxError: Use of const in strict mode. #1

Closed bojidar-bg closed 9 years ago

bojidar-bg commented 9 years ago

Command: $ wat css animation Path: /node_modules/wat/bin/index.js:5 Error:

const uh = require("./../");
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Node version: v0.12.6

bojidar-bg commented 9 years ago

Tried to run it with --harmony, but the result was....

        self.log(chalk.yellow(`\n  Sorry, there's no cheat sheet for that comm
                              ^
SyntaxError: Unexpected token ILLEGAL

Seems like template strings aren't supported in 0.12.6..

bojidar-bg commented 9 years ago

I'll install 0.12.7 and check if there is any difference...

EDIT: Nope, no difference... :smile:

dthree commented 9 years ago

Thanks for your note and details.

I'm writing this in ES2015, much of which is compatible with IOJS. The production version will be made compatible with Babel, I just haven't done this yet as it isn't intended for production yet.

However, I would love feedback and suggestions in the meantime, so if you want to play with it, install io.js. This is easiest if you install NVM. It's really useful.

bojidar-bg commented 9 years ago

BTW, you can simply setup a gruntfile (--save-dev) to do it automatically...

dthree commented 9 years ago

Haha, I will be. Just need to actually do it. Haven't used Babel before, so there's that invisible barrier that really isn't a barrier that you have to get through -haha.