【问题标题】:module-for-acceptance using old project directory使用旧项目目录的接受模块
【发布时间】:2017-10-04 23:18:19
【问题描述】:

这里可能需要一点上下文...我将旧 Ember 项目中的文件复制到一个新目录中以继续处理它。错误。在玩过 nvm、bower、yarn 等之后,我几乎把所有东西都清理干净了。还有一个缺陷。当我运行ember test --server 时,我有一个挥之不去的消息拒绝消失。我已经用新项目的名称更新了我的 environment.js 文件,我已经搜索了 project.json、bower.json 等。我运行了 yarn。错误仍然存​​在。我已经清除了 npm 和 bower 缓存,重新安装,删除了我的 node_modules 和 bower_components 文件夹......我现在很生气。

这是我得到的全部混乱(或多或少):

Died on test #1     at TestLoader.moduleLoadFailure (http://localhost:7357/assets/test-support.js:6468:11)
    at TestLoader.require (http://localhost:7357/assets/test-loader.js:69:14)
    at TestLoader.loadModules (http://localhost:7357/assets/test-loader.js:58:18)
    at Function.TestLoader.load (http://localhost:7357/assets/test-loader.js:89:24)
    at http://localhost:7357/assets/test-support.js:6477:16: Could not find module `new-project-directory/tests/helpers/module-for-acceptance` imported from `old-project-directory/tests/acceptance/game-test`@ 2 ms
Source:     
Error: Could not find module `new-project-directory/tests/helpers/module-for-acceptance` imported from `old-project-directory/tests/acceptance/game-test`
    at missingModule (http://localhost:7357/assets/vendor.js:237:11)
    at findModule (http://localhost:7357/assets/vendor.js:248:7)
    at Module.findDeps (http://localhost:7357/assets/vendor.js:182:24)
    at findModule (http://localhost:7357/assets/vendor.js:252:11)
    at requireModule (http://localhost:7357/assets/vendor.js:35:15)
    at TestLoader.require (http://localhost:7357/assets/test-loader.js:67:9)
    at TestLoader.loadModules (http://localhost:7357/assets/test-loader.js:58:18)
    at Function.TestLoader.load (http://localhost:7357/assets/test-loader.js:89:24)
    at http://localhost:7357/assets/test-support.js:6477:16

【问题讨论】:

    标签: ember.js npm bower ember-cli yarnpkg


    【解决方案1】:

    嗯,这很尴尬。我没有删除测试文件夹。一旦完成,一切都恢复正常。删除测试目录并再次运行ember init 后,我又看到了正常的测试失败。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-13
      • 2021-05-28
      • 1970-01-01
      • 2017-11-24
      相关资源
      最近更新 更多