Babel中的Transpiler错误

时间:2015-12-23 01:52:53

标签: ecmascript-6 browserify babeljs systemjs jspm

我最近想从browserify切换,但我在Chrome 47和Firefox 43上看到了这个错误:

Uncaught TypeError: undefined is not iterable!module.exports.require.getIterator
 @ core.get-iterator.js:7(anonymous function)
 @ index.js:173(anonymous function)
 @ index.js:196J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ context.js:9(anonymous function)
 @ context.js:168(anonymous function)
 @ context.js:170J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ index.js:10(anonymous function)
 @ index.js:192J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ babel-traverse@6.3.24.js:1(anonymous function)
 @ babel-traverse@6.3.24.js:2J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ converters.js:25(anonymous function)
 @ converters.js:282J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ index.js:388(anonymous function)
 @ index.js:393J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ babel-types@6.3.24.js:1(anonymous function)
 @ babel-types@6.3.24.js:2J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ node.js:17(anonymous function)
 @ node.js:74J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ index.js:2(anonymous function)
 @ index.js:4J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703s
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703a
 @ system.src.js:4703(anonymous function)
 @ babel-core@6.3.21.js:1(anonymous function)
 @ babel-core@6.3.21.js:2J
 @ system.src.js:4703d.execute
 @ system.src.js:4703i
 @ system.src.js:4703n
 @ system.src.js:4703execute
 @ system.src.js:4703y
 @ system.src.js:4703w
 @ system.src.js:4703p
 @ system.src.js:4703h
 @ system.src.js:4703(anonymous function)
 @ system.src.js:4703

这在我的index.html中:

  <script src="/js/jspm_packages/system.js"></script>
  <script src="/js/config.js"></script>
  <script>
      System.import('/js/main.js');
  </script>

我按照这里的文档: https://github.com/systemjs/systemjs/blob/master/README.md

main.js只是

  

导入来自&#39;反应&#39 ;;

的反应

不幸的是,我在网上找不到任何关于这个问题的内容。

0 个答案:

没有答案