javascript - NPM错误: Cannot find module 'are-we-there-yet'

标签 javascript node.js codeship modulus.io

我们使用 Codeship 进行持续集成,并使用 Modulus 来托管我们的项目。直到上周代码才正常运行,现在我收到以下错误。

    → modulus deploy -p 'project_name'
Welcome to Modulus
You are logged in as user_name
Selecting project_name

Compressing project...
5.7 MB written
Uploading project...
Upload progress [===================] 100%
Deploying Project...
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Package found: /package.json
Installing node 0.10.25
Installing npm 3.3.4
Installing packages from /package.json

module.js:340
    throw err;
          ^
Error: Cannot find module 'are-we-there-yet'
    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> (/mnt/home/.nvm/v0.10.25/lib/node_modules/npm/node_modules/npmlog/log.js:2:16)
    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)
    at Module.require (module.js:364:17)
npm install failed, trying again

这是 package.json 文件

{
  "name": "project-name",
  "version": "0.0.1-77",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "engines": {
    "node": "0.10.25",
    "npm": "2.x.x"
  },
  "author": "author_name",
  "license": "ISC",
  "dependencies": {
    "express": "3.5.1",
    "underscore": "^1.6.0",
    "handlebars": "^3.0.3",
    "rendr": "1.0.3",
    "rendr-handlebars": "0.2.0",
    "request": "~2.30.0",
    "config": "^0.4.35"
  },
  "devDependencies": {
    "grunt": "^0.4.4",
    "grunt-browserify": "^1.2.12",
    "grunt-contrib-concat": "^0.5.0",
    "grunt-contrib-handlebars": "^0.8.0",
    "grunt-contrib-less": "^0.11.0",
    "grunt-contrib-watch": "^0.6.1",
    "nodemon": "^1.0.17"
  }
}

Note- The project was working perfectly fine a week back. Now I'm facing this issue.

最佳答案

我在 modulus.io 上遇到了同样的问题。上周工作了。今天失败了。我通过在 packages.json 中显式指定 npm 版本来修复此问题。

"engines": {
  "node": "0.10.22",
  "npm": "1.3.14"
}

我认为在您的情况下 2.x.x 无效,因为日志输出无论如何都使用 3.3.4 显示模数。

--乔纳森

关于javascript - NPM错误: Cannot find module 'are-we-there-yet' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32859281/

相关文章:

javascript - onClick 不起作用

java - 在 Node.js 中使用 base64 rsa 公钥进行加密

java - 无法将 DaoAuthenticationConfigurer 应用于已构建的对象

javascript - DNN : HTML editor not showing the folders to select an image

javascript - 如何清除/删除 Knockout.js 中的可观察绑定(bind)?

javascript - 在 react 中加载脚本

javascript - 如何查看Socket IO发送的数据?

javascript - parse.com 云代码不接受 string.includes() 吗?

javascript - 根据环境禁用 Jasmine 的 fdescribe() 和 fit()

continuous-integration - Codeship 不支持 YAML 配置文件吗?