它曾經工作在過去,但今天開始失敗沒有明顯的原因。我還沒有部署相當長的一段時間。CF推送停止工作沒有明顯的原因
該應用程序部署在Bluemix GB上。
-----> IBM SDK for Node.js Buildpack v3.8-20161006-1211
Based on Cloud Foundry Node.js Buildpack v1.5.20
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): >=6.7.0
engines.npm (package.json): >=3.10.3
Resolving node version >=6.7.0 via 'node-version-resolver'
Installing IBM SDK for Node.js (6.7.0) from cache
Resolving npm version >=3.10.3 via semver.io...
Downloading and installing npm 3.10.9 (replacing version 3.10.3)...
-----> Restoring cache
Skipping cache restore (disabled by config)
-----> Checking and configuring service extensions before installing dependencies
-----> Building dependencies
Installing node modules (package.json)
npm ERR! Linux 3.19.0-33-generic
npm ERR! argv "/tmp/staged/app/vendor/node/bin/node" "/tmp/staged/app/vendor/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/staged/app/.npmrc"
npm ERR! node v6.7.0
npm ERR! npm v3.10.9
npm ERR! code EREADFILE
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'
npm ERR!
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! If you need help, you may report this error at:
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/staged/app/npm-debug.log
-----> Build failed
的package.json - 它肯定用過去的工作,並沒有出現變化,也許除了更新節點版本和NPM(但我還測試沒有他們)
{
"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"
}
}
cf push -v顯示了很多請求(沒有任何錯誤跡象)。再有就是,我在這篇文章的開頭放的消息,並有有一個狀態JSON:
"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",
事情爲消除.cfignore
得到更加古怪和上傳node_modules workarounded問題。編輯: 謝謝大家看看這個。問題原來是在babel *軟件包中的一個,它被用來將jsx轉換成javascript。一旦我將它們移動到開發依賴項並開始在本地機器上運行編譯腳本,問題就沒有了。
您可否將您的package.json添加到您的問題以及您正在使用的cli版本('cf -v')? –
cf版本是'6.21.1 + 6fd3c9f-2016-08-10'。我已更新到'6.22.2 + a95e24c-2016-10-27',但沒有更改。 – user1782294
這對cf沒有問題。這是buildpack試圖運行npm install並在你的package的其中一個npm模塊上失敗 如果你刪除了node_modules目錄並在本地運行npm install,你應該看到同樣的錯誤。 –