Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error "const path" SyntaxError: Use of const in strict mode. #178
I update to version 3.0.0 and I'm getting this error:
Are you sure you are on node 5.x (
Yes, I think I found the solution..
But I'm using Visual Studio 2015. In Visual Studio 2015 there's a UI to run the gulp tasks, the "Task Runner Explorer". The exact same gulpfile breaks the task runner in VS with the following output:
I searched a bit and with your help, I found out that VS installs an old node version and probably VS was using it. I had to go to Tools > Options > Projects and Solutions > External Web Tools and add the current nodejs path "C:\Program Files\nodejs".
It's working now. Thank you for the help, and sorry for the trouble...
referenced this issue
Jan 29, 2017
If someone is running the 'Task Runner' tool in Visual Studio (I am using 2017 but should be true in previous versions), it ships with an old version of node which doesn't support ES6. Turning off this version of node to run gulp tasks solves this issue:
This menu can be found here: