流星测试失败了SyntaxError:意外的保留单词



当我运行命令meteor test --driver-package practicalmeteor:mocha时,我会收到以下错误:

W20170314-15:20:44.067(-4)? (STDERR) /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/packages/znewsham_justplay-common.js:971
W20170314-15:20:44.068(-4)? (STDERR) import { Random } from 'meteor/random';
W20170314-15:20:44.068(-4)? (STDERR) ^^^^^^
W20170314-15:20:44.068(-4)? (STDERR) 
W20170314-15:20:44.069(-4)? (STDERR) SyntaxError: Unexpected reserved word
W20170314-15:20:44.069(-4)? (STDERR)     at Object.exports.runInThisContext (vm.js:53:16)
W20170314-15:20:44.070(-4)? (STDERR)     at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:289:30
W20170314-15:20:44.072(-4)? (STDERR)     at Array.forEach (native)
W20170314-15:20:44.073(-4)? (STDERR)     at Function._.each._.forEach (/home/danilo/.meteor/packages/meteor-tool/.1.4.2_6.wp5fef++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170314-15:20:44.074(-4)? (STDERR)     at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:128:5
W20170314-15:20:44.074(-4)? (STDERR)     at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:344:5
W20170314-15:20:44.075(-4)? (STDERR)     at Function.run (/tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/profile.js:480:12)
W20170314-15:20:44.076(-4)? (STDERR)     at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:343:11

我没有在我运行的所有机器上都能得到它,在不使用测试时也不会出现。

我已经尝试重新安装节点,npm,流星,删除node_modules并重新安装和安装babel-present-meteror。

我以前遇到过这个问题,但是它要么只是独自消失,要么是我尝试过的数百件事之一 - 但是我现在无法正常工作。有任何想法吗?

流星版本为1.4.2.6节点为v4.7.3NPM为4.1.2

importexport单词是ecmascript 2015

的一部分

您可以确保安装了ecmascript软件包吗?

https://docs.meteor.com/packages/ecmascript.html

最新更新