textlint-rule / textlint-rule-ginger

textlint rule to check your English grammar with Ginger Proofreading
6 stars 3 forks source link

Unexpected token { while running `textlint --rule textlint-rule-ginger readme.md` #71

Closed yash-nisar closed 7 years ago

yash-nisar commented 7 years ago

I've installed textlint and textlint-rule-ginger globally via npm. However, when I run textlint --rule textlint-rule-ginger readme.md, I get an Unexpected token { error. Here is the stack trace:

✖ Error
Unexpected token {

✖ Stack trace
SyntaxError: Unexpected token {
    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 module.exports (/usr/local/lib/node_modules/textlint/node_modules/interop-require/index.js:2:13)
    at TextLintModuleLoader.loadRule (/usr/local/lib/node_modules/textlint/lib/engine/textlint-module-loader.js:239:31)
    at /usr/local/lib/node_modules/textlint/lib/engine/textlint-module-loader.js:113:28
    at Array.forEach (native)
    at TextLintModuleLoader.loadFromConfig (/usr/local/lib/node_modules/textlint/lib/engine/textlint-module-loader.js:112:30)
    at new TextLintEngineCore (/usr/local/lib/node_modules/textlint/lib/engine/textlint-engine-core.js:179:27)
    at new TextLintEngine (/usr/local/lib/node_modules/textlint/lib/textlint-engine.js:75:12)
    at Object.executeWithOptions (/usr/local/lib/node_modules/textlint/lib/cli.js:180:26)
    at Object.execute (/usr/local/lib/node_modules/textlint/lib/cli.js:129:25)

I'm using textlint@7.3.0 and textlint-rule-ginger@2.1.0. All the other plugins of textlint seem to run fine.

yash-nisar commented 7 years ago

Resolved by upgrading nodejs. I had an older version of nodejs.