在 debian linux 上尝试 运行 ember 测试时出现奇怪的错误
Strange error trying to run ember tests on debian linux
我们所有的测试都在多台 macOS 机器上通过了信号灯-ci,但是当我们尝试在新的 debian 机器上构建和 运行 测试时,我们在 loader.js:143
not ok 1320 Chrome 72.0 - TestLoader Failures: zipbooks/tests/unit/utils/request-log-test: could not be loaded
---
actual: >
null
stack: >
TypeError: Cannot read property 'exports' of undefined
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at requireModule (http://localhost:45371/assets/vendor.js:32:18)
message: >
Died on test #1 at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)
at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)
at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)
at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)
at loadTests (http://localhost:45371/assets/test-support.js:11174:22)
at start (http://localhost:45371/assets/test-support.js:10857:33)
at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property 'exports' of undefined
Log: |
{ type: 'info',
text: '\'Unit assertion failed and test has been paused for inspection.\'\n' }
{ type: 'error',
text: '{ module: \'TestLoader Failures\',\n name: \'zipbooks/tests/unit/utils/request-log-test: could not be loaded\',\n result: false,\n message: \'Died on test #1 at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)\n at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)\n at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)\n at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)\n at loadTests (http://localhost:45371/assets/test-support.js:11174:22)\n at start (http://localhost:45371/assets/test-support.js:10857:33)\n at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property \\'exports\\' of undefined\',\n actual: null,\n testId: \'8629d10a\',\n negative: false,\n runtime: 1,\n todo: false,\n source: \'TypeError: Cannot read property \\'exports\\' of undefined\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at requireModule (http://localhost:45371/assets/vendor.js:32:18)\' }\n' }
我们找不到任何信息,也无法猜测可能导致此错误的原因。
ember-cli: 3.1.4
node: 8.5.0
os: linux x64
我看到的模式是任何使用 setupTest
、setupApplicationTest
或 setupRenderingTest
的测试都失败了。没有任何设置挂钩的常规 qunit 测试可以正常通过。
最可能的原因是特定于平台的二进制依赖项。你先试过运行npm rebuild
吗?某些依赖项(例如 node-sass)使用特定于平台的二进制文件,需要重新构建。如果那是你的问题,如果你需要以自动化方式执行此操作,你将希望将重建的范围限制为仅必要的依赖项,例如npm rebuild some-package some-other-package
而不是全包 npm rebuild
不幸的是,yarn
尚未实现重建功能,因此我们已经回到 npm
,出于这个和其他原因。 -- link to issue in GitHub
问题是没有在我们的 in-repo 插件中安装 yarn 依赖项
我们所有的测试都在多台 macOS 机器上通过了信号灯-ci,但是当我们尝试在新的 debian 机器上构建和 运行 测试时,我们在 loader.js:143
not ok 1320 Chrome 72.0 - TestLoader Failures: zipbooks/tests/unit/utils/request-log-test: could not be loaded
---
actual: >
null
stack: >
TypeError: Cannot read property 'exports' of undefined
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at Module._reify (http://localhost:45371/assets/vendor.js:148:59)
at Module.reify (http://localhost:45371/assets/vendor.js:135:27)
at Module.exports (http://localhost:45371/assets/vendor.js:109:10)
at requireModule (http://localhost:45371/assets/vendor.js:32:18)
message: >
Died on test #1 at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)
at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)
at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)
at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)
at loadTests (http://localhost:45371/assets/test-support.js:11174:22)
at start (http://localhost:45371/assets/test-support.js:10857:33)
at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property 'exports' of undefined
Log: |
{ type: 'info',
text: '\'Unit assertion failed and test has been paused for inspection.\'\n' }
{ type: 'error',
text: '{ module: \'TestLoader Failures\',\n name: \'zipbooks/tests/unit/utils/request-log-test: could not be loaded\',\n result: false,\n message: \'Died on test #1 at TestLoader.moduleLoadFailure (http://localhost:45371/assets/test-support.js:11150:24)\n at TestLoader.<anonymous> (http://localhost:45371/assets/test-support.js:10463:16)\n at TestLoader.require (http://localhost:45371/assets/test-support.js:10451:27)\n at TestLoader.loadModules (http://localhost:45371/assets/test-support.js:10443:16)\n at loadTests (http://localhost:45371/assets/test-support.js:11174:22)\n at start (http://localhost:45371/assets/test-support.js:10857:33)\n at Module.callback (http://localhost:45371/assets/tests.js:20710:25): Cannot read property \\'exports\\' of undefined\',\n actual: null,\n testId: \'8629d10a\',\n negative: false,\n runtime: 1,\n todo: false,\n source: \'TypeError: Cannot read property \\'exports\\' of undefined\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at Module._reify (http://localhost:45371/assets/vendor.js:148:59)\n at Module.reify (http://localhost:45371/assets/vendor.js:135:27)\n at Module.exports (http://localhost:45371/assets/vendor.js:109:10)\n at requireModule (http://localhost:45371/assets/vendor.js:32:18)\' }\n' }
我们找不到任何信息,也无法猜测可能导致此错误的原因。
ember-cli: 3.1.4
node: 8.5.0
os: linux x64
我看到的模式是任何使用 setupTest
、setupApplicationTest
或 setupRenderingTest
的测试都失败了。没有任何设置挂钩的常规 qunit 测试可以正常通过。
最可能的原因是特定于平台的二进制依赖项。你先试过运行npm rebuild
吗?某些依赖项(例如 node-sass)使用特定于平台的二进制文件,需要重新构建。如果那是你的问题,如果你需要以自动化方式执行此操作,你将希望将重建的范围限制为仅必要的依赖项,例如npm rebuild some-package some-other-package
而不是全包 npm rebuild
不幸的是,yarn
尚未实现重建功能,因此我们已经回到 npm
,出于这个和其他原因。 -- link to issue in GitHub
问题是没有在我们的 in-repo 插件中安装 yarn 依赖项