RoyBarOn
RoyBarOn

Reputation: 987

PhpStorm does not recognize node.js syntax

I can't configure PhpStorm to work with NodeJs syntax, I've followed This guide but for some reason it's not working - as you can see in the picture

enter image description here

Upvotes: 2

Views: 653

Answers (2)

Muhammad Ali Abed
Muhammad Ali Abed

Reputation: 86

yes i know it is late, but i thought maybe somebody land on this page & this might help.

first make sure node is installed using node -v command in terminal & from File menu in phpstorm go to Settings -> Languages & Frameworks -> Node.js and NPM

enter image description here

make sure Coding assistance for Node.js is checked like in the picture above (a package may get installed automatically)

& if it didn't work, try right click among codes of the file & from the big menu that appears (the menu i can't take screenshot of!) go to the last item "Use JavaScript Library" & from its submenu select "Node.js Core"

best regards :)

Upvotes: 0

Oksana
Oksana

Reputation: 857

Please check what JS version is chosen in Preferences/Settings | Languages&Frameworks | JavaScript.

Arrow functions are supported only since ECMAScript 6.

Upvotes: 5

Related Questions