这是因为  app.use(function * (){ 语句中有一个 * ,这种方式被称为generator functions ,一般写作function *(){...} 的形式,在此类function 中可以支持ES6的一种yield概念。

为了保证这种新型的方法可以编译通过,在运行node 命令的时候加上一个harmony参数就可以了:

node --harmony hello.js

假如在插件中使用的化可以引入harmony 并自执行。

harmonize = require('harmonize')()

『奇葩问题集锦』function * (next){ 执行报错 SyntaxError: Unexpected token *的更多相关文章

  1. 『奇葩问题集锦』Zepto 页面唤醒拨号功能点透

    不废话直接上代码: HTML: <a class="js-tel tel" data-tel="1312414"></a> JS: // ...

  2. 『奇葩问题集锦』npm install 报错 node-pre-gyp ERR! node-pre-gyp -v v0.6.25

    gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you ...

  3. 『奇葩问题集锦』Ruby 切换淘宝源报错WARNING: Error fetching data: SSL_connect returned=1 errno=0 state=SSLv3 read s erver certificate B: certificate verify failed

    ===>首先需要使用https<===https://ruby.taobao.org/ 第一步 下载http://pan.baidu.com/s/1kU0rxtH 复制到ruby安装的根目 ...

  4. 『奇葩问题集锦』Cannot find module 'webpack/lib/node/NodeTemplatePlugin'

    第一步:npm config get prefix ,获取输出path“C:\Users\jaxGu\AppData\Roaming\npm”加上"\node_modules"用于 ...

  5. 『奇葩问题集锦』Malformed lock file found: /var/cache/dnf/metadata_lock.pid.

    Malformed lock file found: /var/cache/dnf/metadata_lock.pid.Ensure no other dnf process is running a ...

  6. 『奇葩问题集锦』Fedora ubuntu 下使用gulp 报错 Error: watch ENOSPC 解决方案

    用gulp启动,错误如下 Error: watch ENOSPC at exports._errnoException (util.js:746:11) at FSWatcher.start (fs. ...

  7. python脚本执行报错:SyntaxError: Non-ASCII character '\xe6' in file ip.py on line 4...

    报错信息 [root@chenbj ~]# python ip.py 192.168.1.1 File "ip.py", line 4 SyntaxError: Non-ASCII ...

  8. JS function document.onclick(){}报错Syntax error on token "function", delete this token

    JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...

  9. oracle创建包后执行报错:object omgmig.test_package is invalid.

    今天学习了一下oracle的包的写法,然后碰到这么个问题.包声明和包主体都正确,但是就是执行报错:object omgmig.test_package is invalid. 这是会报错的sql,看起 ...

随机推荐

  1. 针对C#程序做性能测试的一些基本准则

    博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:针对C#程序做性能测试的一些基本准则.

  2. WinForm简单多国语言实现

    参考:http://minmin86121.blog.163.com/blog/static/4968115720119259151898/ http://www.cnblogs.com/hakuci ...

  3. C#.bat文件清理工程目录

    另外一种方法是自己写一个bat文件来清理,非常方便,下面是自己写的验证过比较好用的方法. bat文件内容如下: echo 正在清理VS2010工程中不需要的文件 echo 请确保本文件放置在工程目录之 ...

  4. 在JAVA中线程到底起到什么作用

    这是javaeye上非常经典的关于线程的帖子,写的非常通俗易懂的,适合任何读计算机的同学. 线程同步 我们可以在计算机上运行各种计算机软件程序.每一个运行的程序可能包括多个独立运行的线程(Thread ...

  5. Delphi 根据快捷方式路径取源文件地址

    unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ...

  6. 分布式助手Zookeeper(三)

    分布式助手Zookeeper(三)博客分类: Zookeeper zookeeperapi操作zookeeper 本篇,散仙要介绍一下基于zookeeper的一些API的编程. 在此之前,我们先来熟悉 ...

  7. cocos2dx3.1.1+cocosstudio+lua问题总结

    一.DeprecatedEnum.lua no value _G.LAYOUT_ABSOLUTE                 = ccui.Type.ABSOLUTE _G.LAYOUT_LINE ...

  8. pair的例子

    11.12 编写程序,读入string和int的序列,将每个string和int存入一个pair中,pair保存在一个vector中. #include<iostream> #includ ...

  9. 69 Spring Interview Questions and Answers – The ULTIMATE List--reference

    This is a summary of some of the most important questions concerning the Spring Framework, that you ...

  10. Android开发之”再按一次退出程序“的实现

    现在移动客户端退出程序对话框退出越来越不流行了,都开始使用连续按两次来退出,即著名的“再按一次退出程序”模式.现在就看看怎么实现的吧. @SuppressLint("HandlerLeak& ...