node.js - app.delete 在使用 nodeclipse IDE 的 Express 上引发语法错误

标签 node.js express syntax-error nodeclipse

有人熟悉 nodeclipse IDE 上的这个错误吗?

  app.delete('/delete', function(req, res) {
  ....
  });

标记“.”、预期存在语法错误

最佳答案

尝试

 app['delete'](...)

delete 是旧 ES 版本中的保留字,因此除非 nodeclipse 支持 ES5,否则可能会引发错误。

如果 nodeclipse 与 jslint 一起使用,请在文件顶部写入

/*jslint es5:true*/

它应该消除错误。

关于node.js - app.delete 在使用 nodeclipse IDE 的 Express 上引发语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24013493/

相关文章:

ajax - Node.js + Express : Upload a file without reloading page

node.js - 找不到快速命令

python - python : cannot instantiate more than one or two variables (SyntaxError raised)

node.js - 错误: A required parameter (id) was not provided as a string in getStaticPaths for/location/[id]

javascript - Node.js - 生成丑陋的类名

javascript - request post 与 axios post 解析不同的结果

python - 为什么我收到此条件语句的语法错误?

node.js - node-gyp build 如何在构建 Node 扩展时指定目标 Node 版本

node.js - 在 axios.delete() 上获取 404(未找到)

C错误: Expected expression before int