在运行ember test
和ember test -s
多次成功之后,我无法在特定项目上运行它们中的任何一个。自上次成功运行以来,我唯一想到的就是在ember test -s
运行时Terminal.app崩溃了。
现在,当我在该项目上运行ember test -s
时,总是会出现此错误:
Global error: Error: Assertion Failed: The initializer 'container-debug-adapter' has
already been registered at http://localhost:7357/assets/vendor.js, line 38210
Global error: Error: Assertion Failed: The tests file was not loaded. Make sure your
tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 38210
Error: Assertion Failed: The initializer 'container-debug-adapter' has already been
registered at http://localhost:7357/assets/vendor.js, line 38210
Error: Assertion Failed: The tests file was not loaded. Make sure your tests
index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 38210
[如果我尝试在其他项目上运行ember test -s
,则效果很好。因此在我看来,必须坐在项目文件夹中某个位置的git无法跟踪的某些问题会导致此问题。
我通过删除node_modules
和package-lock.json
然后运行npm install
解决了这个问题。
我希望我理解可能导致此问题的原因以及为什么重新安装所有依赖项才能解决此问题。