错误:模块流星无法加载。 WebdriverIO

时间:2017-10-20 13:38:48

标签: node.js linux meteor mocha webdriver-io

最近我们重启了我们的服务器:

Linux version 4.4.4-200.fc22.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #1 SMP Fri Mar 4 20:06:29 UTC 2016

当我尝试使用webdriverio运行我的测试时,对于我的meteor应用程序:

//scripts:{"wdio-test": "wdio tests/config/wdio.mocha.conf.js"}

meteor npm run wdio-tests

我收到此错误:

ERROR: Module meteor can't get loaded. Are you sure you have installed it?
Note: if you've installed WebdriverIO globally you need to install these external modules globally too!
chrome
    at MochaAdapter.load (node_modules/wdio-mocha-framework/build/adapter.js:473:23)
    at wdio-mocha-framework/build/adapter.js:321:28
    at Array.forEach (native)
    at MochaAdapter.requireExternalModules (node_modules/wdio-mocha-framework/build/adapter.js:313:21)
    at MochaAdapter.options (node_modules/wdio-mocha-framework/build/adapter.js:139:18)
    at Suite.<anonymous> (node_modules/wdio-mocha-framework/build/adapter.js:171:43)
    at emitThree (events.js:102:20)
    at Suite.emit (events.js:175:7)
    at node_modules/mocha/lib/mocha.js:230:11
    at Array.forEach (native)

这些是我的版本:

meteor --version
Meteor 1.5.2.2

meteor node --version
v4.8.4

meteor npm --version
4.6.1

node --version
v6.11.2

npm --version
3.10.10

包裹:

  "mocha": "^3.5.0",
  "mocha-mongoose": "^1.2.0",
  "mocha-reporter": "0.0.3",
  "mockery": "^2.1.0",
  "mongo-mock": "^2.5.0",
  "mongoose": "^4.12.0",
  "selenium-webdriver": "^3.0.0-beta-2",
  "wdio-mocha-framework": "^0.5.11",
  "webdriverio": "^4.8.0",

我们最近从Meteor 1.3.5升级到1.5.2.2,但是webdriver测试没有问题。自重启以来,我收到了上述错误。

我还没有在全球范围内安装任何软件包。

任何人都知道如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

我发现我在wdio-mocha.conf

中有这个选项
 mochaOpts: {
    ui: 'bdd',
    compilers: ['js:babel-register'],
    require: ['babel-polyfill', 'meteor'],
 },

删除流星标签解决了这个问题。

我会暂时搁置这个问题,也许有人必须添加一些东西。