-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "const path" SyntaxError: Use of const in strict mode. #178
Comments
Upgrade your node version. |
I'm currently using node version 5.4.1. Can I update to a 5.x version or do I need to update to 6.x? |
Are you sure you are on node 5.x ( http://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode |
I was on 4.4.2LTS and update to 5.4.1 a fews weeks ago. C:>node -v C:>npm -v |
@napcat Add this code snippet to the top of your gulpfile: console.log('Node version: ' + process.version); then please show us the result. |
I updated the lib, and get this issues too, |
@napcat Any feedback? |
Yes, I think I found the solution.. D:\project>gulp build
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... |
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: |
I update to version 3.0.0 and I'm getting this error:
The text was updated successfully, but these errors were encountered: