eclipse javascript syntax error on hashbang line

强颜欢笑 提交于 2019-12-11 01:48:53

问题


when I import some existing node.js code into the eclipse workspace, it complains with

Syntax error on token "Invalid Character", delete this token

on the #! /usr/bin/env/node hashbang line.

How can I tell eclipse to ignore this error?


回答1:


With Nodeclipse 0.7 and JSHint Integraton, it is now general question "How to configure JSHint" for that.

see How to ignore node shebang error in Eclipse?




回答2:


I have an answer to this question! Remove jsdt nature from your Eclipse .project file. Keep node nature.

<natures>
    <nature>org.nodeclipse.ui.NodeNature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>

See also: How to ignore node shebang error in Eclipse?.

Also, if you do not have node nature, install the nodeclipse plugin. It's great!



来源:https://stackoverflow.com/questions/17192446/eclipse-javascript-syntax-error-on-hashbang-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!