node.js - 在构建中找不到模块 Q

标签 node.js travis-ci jasmine-node

我在 Travis-CI 上运行了很长时间的 jasmine 测试,但在最新的提交中,我收到错误 Cannot find module Q 而 package.json 中满足了依赖关系。如果我在本地运行它们,测试会顺利通过。

Message:
  Error: Cannot find module 'Q'
Stacktrace:
  Error: Cannot find module 'Q'
 at Function.Module._resolveFilename (module.js:338:15)
 at Function.Module._load (module.js:280:25)
 at Module.require (module.js:364:17)
 at require (module.js:380:17)
 at Object.<anonymous> (/home/travis/build/CraftYourModCorporation/OpenCubes/lib/api/mods.js:18:7)
 at Object.<anonymous> (/home/travis/build/CraftYourModCorporation/OpenCubes/lib/api/mods.js:453:4)
 at Module._compile (module.js:456:26)
 at Object.Module._extensions..js (module.js:474:10)
 at Module.load (module.js:356:32)
 at Function.Module._load (module.js:312:12)

这是整个项目 https://github.com/CraftYourModCorporation/OpenCubes

最佳答案

尝试小写需要“q”。 Travis-CI 在 *nix 环境中运行,其中文件系统通常区分大小写。

关于node.js - 在构建中找不到模块 Q,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23835144/

相关文章:

ubuntu - 如何在 Travis-CI 上使用 boost-build 构建?

javascript - 如何使用 jasmine 框架对特定文件 node.js 进行单元测试

node.js - 如何使用 jasmine-node 查看抛出的异常?

node.js - 用 Node.js 原生 Promise 替换 Bluebird 会破坏 Promise.reject

javascript - WebRTC 数据通道服务器到客户端的 UDP 通信

node.js - 当一个模块位于另一模块的父目录中时,模块之间存在循环依赖关系,导入的模块是未定义的

node.js - 使用 jasmine-node 和 jquery-jasmine 测试客户端 JavaScript

node.js - 未处理的拒绝 (FirebaseError) : No document to update

gradle - Travis CI无法使用Gradle包装器解压缩Gradle 1.11

bash - 即使测试失败,TravisCI构建也会成功