它曾经在过去工作,但今天开始失败,没有明显的理由。我已经部署了很长时间。
该应用程序部署在Bluemix GB上。
{
"name": "Atlas2",
"version": "0.0.2",
"private": true,
"scripts": {
"start": "node app.js",
"test": "mocha server-tests/tests*"
},
"dependencies": {
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.5.0",
"babel-runtime": "^6.9.2",
"body-parser": "^1.15.2",
"bootstrap": "^3.3.7",
"cfenv": "1.0.x",
"express": "^4.14.0",
"express-stormpath": "^3.1.3",
"flux": "*",
"globals": "^9.9.0",
"history": "^3.0.0",
"imports-loader": "^0.6.5",
"jquery": "*",
"jsplumb": "2.1.8",
"keymirror": "*",
"mongoose": "*",
"morgan": "^1.7.0",
"path": "*",
"react": "^15.3.0",
"react-bootstrap": "^0.30.3",
"react-document-title": "^2.0.2",
"react-dom": "^15.3.0",
"react-router": "^2.6.0",
"react-router-bootstrap": "*",
"react-stormpath": "^1.2.2",
"script-loader": "^0.7.0",
"underscore": "*",
"webpack": "1.13.1",
"log4js" : "*",
"fs" :"*",
"key-mirror-nested": "^1.2.4",
"webpack-dev-middleware": "^1.6.1",
"q" : "*"
},
"devDependencies": {
"mocha": "*",
"should": "10.0.0",
"supertest": "*"
},
"repository": {},
"engines": {
"node": "6.7.0",
"npm" : "3.10.9"
}
}
package.json - 它过去一定用来工作,并且没有任何变化,可能除了更新节点版本和npm(但我已经测试过没有它们)
"package_state": "FAILED",
"health_check_type": "port",
"health_check_timeout": 60,
"staging_failed_reason": "BuildpackCompileFailed",
"staging_failed_description": "App staging failed in the buildpack compile phase",
"diego": false,
"docker_image": null,
"package_updated_at": "2016-10-27T17:19:07Z",
"detected_start_command": "./vendor/initial_startup.rb",
cf push -v显示了大量请求(没有任何错误迹象)。然后就是我在这篇文章开头写的消息,那里有一个状态json:
.cfignore
在删除public class Converter
{
public string Celsiusz { get; set; }
public string Fahrenheit { get; set; }
public string Kelvin{ get; set; }
public string Rankinen { get; set; }
public string Reaumur { get; set; }
public string Romer { get; set; }
public string Delisle { get; set; }
public string Newton { get; set; }
double CelsiuszDouble;
bool bupa = double.TryParse(Newton, out CelsiuszDouble);
}
和上传node_modules 变通方法问题时,事情变得更加怪异。
编辑: 感谢大家对此进行调查。问题原来是在一个babel *包中,用于将jsx转换为javascript。一旦我将它们移动到dev依赖项并开始在我的本地机器上运行编译脚本,问题就消失了。
答案 0 :(得分:2)
这条线突出了我npm ERR! Error extracting /home/vcap/.npm/fs/0.0.0/package.tgz archive: ENOENT: no such file or directory, open '/home/vcap/.npm/fs/0.0.0/package.tgz'
fs模块是节点核心模块之一,不需要安装。我认为通过尝试安装它会遇到一些问题。
尝试从package.json中删除"fs" :"*",
并重新安装。
答案 1 :(得分:0)
尝试应用的cf restage
,除非你只能cf delete
并重新创建它(.cfignore仍然不包括node_modules)。