sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

SyntaxError: Use of const in strict mode. shell.js:2 #111

Closed stevepeak closed 8 years ago

stevepeak commented 8 years ago
/home/ubuntu/owner/repo/node_modules/grunt-shell/tasks/shell.js:2
const exec = require('child_process').exec;
^^^^^
Loading "shell.js" tasks...ERROR
>> SyntaxError: Use of const in strict mode.
Warning: Task "shell" not found. Use --force to continue.

There is a diff from the last 10 days expressing changes to shell.js: https://github.com/sindresorhus/grunt-shell/compare/master@%7B10day%7D...master#diff-6d22d6680da3f1d371e46145feff6cd3

Thoughts or fix suggestions?

SamVerschueren commented 8 years ago

What node version are you at? The required version for this is at least 4.x.

stevepeak commented 8 years ago

Thanks for the quick reply 👍 Using Node 0.10.22. The install command to install is simply npm install grunt-shell.

Can npm detect the node version and install the compatible/old version of grunt-shell v1.3.1?

SamVerschueren commented 8 years ago

The first question to ask is: 'Why are you still using such an ancient version?'. I really suggest upgrading to the latest LTS (4.6.x).

Can npm detect the node version and install the compatible/old version of grunt-shell

No, you will have to do this manually.

stevepeak commented 8 years ago

@SamVerschueren Thanks! I'm just using node for grunt tasks only. So keeping up with the Kardashians was not a high priority... 👍 thank you!