Arrow function "expression expected" syntax error

Solution 1:

I had the error expression expected reported by Webstorm when editing a Node.js program. In this case the solution is to set the language version to a version that supports this feature.

enter image description here

Solution 2:

The following is what i did that work for me. (1) I change the JavaScript language option to ECMAScript 6 as show in the selected answer by @Joe23

(2) I close the Webstorm project/application.

(3) Navigate to the project folder and delete the .idea folder in it. I believe this is the folder webstorm generated to keep information about the project/application.

(4) I reopen my project in webstorm and the errors are gone.