【问题标题】:Bluemix Deployment Issue Node.js w/ ExpressBluemix 部署问题 Node.js w/ Express
【发布时间】:2017-09-12 07:25:00
【问题描述】:

我的部署失败时遇到问题,不知道为什么。任何帮助将不胜感激!我花了很长时间试图找出没有运气的情况。我很确定我错过了一些愚蠢的东西。这很古怪。构建将成功,并将服务器。然后它崩溃了,我现在零个想法为什么。

使用 Node.js 构建包:https://github.com/cloudfoundry/nodejs-buildpack

Package.json 文件

{
    "name": "core-backend-server",
    "version": "1.0.0",
    "dependencies": {
        "bcryptjs": "^2.1.0",
        "body-parser": "^1.13.2",
        "cors": "^2.8.1",
        "express": "^4.13.0",
        "express-error-middleware": "^1.3.0",
        "express-jwt": "^3.0.1",
        "jade": "^1.11.0",
        "jsonwebtoken": "^5.0.2",
        "lodash": "^3.10.0",
        "mongodb": "^2.1.16",
        "mongoskin": "^2.1.0",
        "q": "^1.4.1",
        "request": "^2.58.0",
        "rootpath": "^0.1.2",
        "cfenv": "1.0.x"
    },
    "license": "MIT",
    "scripts": {
        "start": "node app.js"
    },
    "engines": {
        "node" : "7.8.x"
    }
}

Bluemix 部署日志:

4/16/2017 1:40:29 PM    OUT APP Exit status 143
4/16/2017 1:40:29 PM    OUT CELL    Exit status 0
4/16/2017 1:40:33 PM    OUT API Updated app with guid e6824266-a05f-     4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:40:33 PM    OUT STG Creating container
4/16/2017 1:40:48 PM    OUT STG Successfully created container
4/16/2017 1:40:48 PM    OUT STG Downloading app package...
4/16/2017 1:40:55 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:40:56 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:40:56 PM    OUT STG Downloading build artifacts cache...
4/16/2017 1:40:57 PM    OUT STG Downloaded build artifacts cache (4.1M)
4/16/2017 1:40:57 PM    OUT STG Staging...
4/16/2017 1:41:00 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 1:41:00 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:41:00 PM    OUT STG 
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 1:41:00 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:41:00 PM    OUT STG NODE_ENV=production
4/16/2017 1:41:00 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:41:00 PM    OUT STG -----> Installing binaries
4/16/2017 1:41:00 PM    OUT STG engines.node (package.json):  unspecified
4/16/2017 1:41:00 PM    OUT STG engines.npm (package.json):   unspecified (use default)
4/16/2017 1:41:00 PM    OUT STG Downloading and installing node 4.8.2...
4/16/2017 1:41:03 PM    OUT STG -----> Restoring cache
4/16/2017 1:41:03 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 1:41:03 PM    OUT STG -----> Building dependencies
4/16/2017 1:41:03 PM    OUT STG Rebuilding any native modules
4/16/2017 1:41:06 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 1:41:06 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 1:41:06 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 1:41:06 PM    OUT STG Installing any new modules (package.json)
4/16/2017 1:41:09 PM    OUT STG -----> Caching build
4/16/2017 1:41:09 PM    OUT STG Clearing previous node cache
4/16/2017 1:41:09 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 1:41:09 PM    OUT STG - .npm (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG -----> Build succeeded!
4/16/2017 1:41:23 PM    OUT STG Exit status 0
4/16/2017 1:41:23 PM    OUT STG Staging complete
4/16/2017 1:41:23 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading droplet...
4/16/2017 1:41:30 PM    OUT STG Uploaded droplet (43.7M)
4/16/2017 1:41:30 PM    OUT STG Destroying container
4/16/2017 1:41:31 PM    OUT CELL    Creating container
4/16/2017 1:41:33 PM    OUT CELL    Successfully created container
4/16/2017 1:41:38 PM    OUT CELL    Starting health monitoring of container
4/16/2017 1:41:39 PM    OUT APP Server listening on port ---- 8080
4/16/2017 1:41:40 PM    OUT CELL    Container became healthy
4/16/2017 1:43:28 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 1:44:54 PM    OUT CELL    Exit status 0
4/16/2017 1:44:54 PM    OUT APP Exit status 143
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:44:56 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:45:16 PM    OUT STG Downloading app package...
4/16/2017 1:45:25 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:45:25 PM    OUT STG Staging...
4/16/2017 1:45:28 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:45:28 PM    OUT STG 
4/16/2017 1:45:28 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:45:28 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:45:28 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:45:28 PM    OUT STG -----> Installing binaries
4/16/2017 1:45:28 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG Downloading and installing node ...
4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223
4/16/2017 1:45:29 PM    OUT STG Destroying container
4/16/2017 1:45:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:04:52 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:06:06 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:06:07 PM    OUT STG Creating container
4/16/2017 2:06:20 PM    OUT STG Successfully created container
4/16/2017 2:06:20 PM    OUT STG Downloading app package...
4/16/2017 2:06:31 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:06:31 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:06:31 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:06:31 PM    OUT STG Staging...
4/16/2017 2:06:34 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:06:34 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:06:34 PM    OUT STG 
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:06:34 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:06:34 PM    OUT STG NODE_ENV=production
4/16/2017 2:06:34 PM    OUT STG -----> Installing binaries
4/16/2017 2:06:34 PM    OUT STG engines.node (package.json):  ^6.9.x
4/16/2017 2:06:34 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:06:34 PM    OUT STG 
4/16/2017 2:06:34 PM    OUT STG Downloading and installing node 6.10.2...
4/16/2017 2:06:36 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.10.2-linux-x64-9f48b587.tgz]
4/16/2017 2:06:57 PM    OUT STG -----> Restoring cache
4/16/2017 2:06:58 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:06:58 PM    OUT STG -----> Building dependencies
4/16/2017 2:06:58 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:06:58 PM    OUT STG Rebuilding any native modules
4/16/2017 2:07:00 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:07:00 PM    OUT STG jsbn@0.1.1 /tmp/app/node_modules/jsbn
4/16/2017 2:07:00 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:07:04 PM    OUT STG -----> Caching build
4/16/2017 2:07:04 PM    OUT STG Clearing previous node cache
4/16/2017 2:07:04 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG -----> Build succeeded!
4/16/2017 2:07:27 PM    OUT STG Exit status 0
4/16/2017 2:07:27 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading droplet...
4/16/2017 2:07:27 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:07:30 PM    OUT STG Uploading complete
4/16/2017 2:07:31 PM    OUT STG Destroying container
4/16/2017 2:07:31 PM    OUT CELL    Creating container
4/16/2017 2:07:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:07:43 PM    OUT CELL    Successfully created container
4/16/2017 2:07:50 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:07:51 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:07:52 PM    OUT CELL    Container became healthy
4/16/2017 2:11:00 PM    OUT APP Exit status 143
4/16/2017 2:11:00 PM    OUT CELL    Exit status 0
4/16/2017 2:11:00 PM    OUT CELL    Destroying container
4/16/2017 2:11:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:11:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:11:02 PM    OUT STG Creating container
4/16/2017 2:11:08 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:11:25 PM    OUT STG Downloading app package...
4/16/2017 2:11:33 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:11:33 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:11:34 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:11:34 PM    OUT STG Staging...
4/16/2017 2:11:36 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:11:36 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:11:36 PM    OUT STG 
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:11:36 PM    OUT STG NODE_ENV=production
4/16/2017 2:11:36 PM    OUT STG -----> Installing binaries
4/16/2017 2:11:36 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:11:36 PM    OUT STG 
4/16/2017 2:11:36 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:11:39 PM    OUT STG Downloading and installing npm ^2.1.x (replacing version 4.2.0)...
4/16/2017 2:11:54 PM    OUT STG -----> Restoring cache
4/16/2017 2:11:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:11:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:11:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:11:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:11:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:11:57 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:11:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:12:00 PM    OUT STG -----> Caching build
4/16/2017 2:12:00 PM    OUT STG Clearing previous node cache
4/16/2017 2:12:00 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:12:00 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:12:01 PM    OUT STG -----> Build succeeded!
4/16/2017 2:12:28 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploaded build artifacts cache (260B)
4/16/2017 2:12:33 PM    OUT STG Uploaded droplet (49.3M)
4/16/2017 2:12:33 PM    OUT STG Uploading complete
4/16/2017 2:12:33 PM    OUT STG Destroying container
4/16/2017 2:12:34 PM    OUT CELL    Creating container
4/16/2017 2:12:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:12:50 PM    OUT CELL    Successfully created container
4/16/2017 2:12:58 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:12:59 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:25:44 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:27:00 PM    OUT CELL    Exit status 0
4/16/2017 2:27:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:27:00 PM    OUT APP Exit status 143
4/16/2017 2:27:00 PM    OUT CELL    Destroying container
4/16/2017 2:27:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:27:02 PM    OUT STG Creating container
4/16/2017 2:27:12 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:27:18 PM    OUT STG Successfully created container
4/16/2017 2:27:18 PM    OUT STG Downloading app package...
4/16/2017 2:27:28 PM    OUT STG Downloaded app package (44.3M)
4/16/2017 2:27:28 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:27:28 PM    OUT STG Downloaded build artifacts cache (260B)
4/16/2017 2:27:28 PM    OUT STG Staging...
4/16/2017 2:27:31 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:27:31 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:27:31 PM    OUT STG 
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:27:31 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:27:31 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:27:31 PM    OUT STG -----> Installing binaries
4/16/2017 2:27:31 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:27:31 PM    OUT STG 
4/16/2017 2:27:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:27:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:27:54 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:27:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:27:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:27:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:27:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:27:59 PM    OUT STG -----> Caching build
4/16/2017 2:27:59 PM    OUT STG Clearing previous node cache
4/16/2017 2:27:59 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:27:59 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG -----> Build succeeded!
4/16/2017 2:28:24 PM    OUT STG Exit status 0
4/16/2017 2:28:24 PM    OUT STG Staging complete
4/16/2017 2:28:24 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading droplet...
4/16/2017 2:28:24 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:28:29 PM    OUT STG Uploading complete
4/16/2017 2:28:29 PM    OUT STG Destroying container
4/16/2017 2:28:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:28:55 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:44:03 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 2:45:18 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:45:18 PM    OUT APP Exit status 143
4/16/2017 2:45:18 PM    OUT CELL    Exit status 0
4/16/2017 2:45:18 PM    OUT CELL    Destroying container
4/16/2017 2:45:19 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:45:29 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:45:39 PM    OUT STG Successfully created container
4/16/2017 2:45:39 PM    OUT STG Downloading app package...
4/16/2017 2:45:47 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:45:47 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:45:47 PM    OUT STG Staging...
4/16/2017 2:45:52 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:45:52 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:45:52 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:45:52 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:45:52 PM    OUT STG -----> Installing binaries
4/16/2017 2:45:52 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:45:52 PM    OUT STG engines.npm (package.json):   >=2.1.x
4/16/2017 2:45:52 PM    OUT STG 
4/16/2017 2:45:52 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:45:54 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
4/16/2017 2:45:55 PM    OUT STG Downloading and installing npm >=2.1.x (replacing version 4.2.0)...
4/16/2017 2:46:15 PM    OUT STG -----> Restoring cache
4/16/2017 2:46:16 PM    OUT STG Loading 3 from cacheDirectories (default):
4/16/2017 2:46:16 PM    OUT STG - .npm (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - .cache/yarn (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - bower_components (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG -----> Building dependencies
4/16/2017 2:46:16 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:46:16 PM    OUT STG Rebuilding any native modules
4/16/2017 2:46:19 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:46:19 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:46:19 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:46:21 PM    OUT STG -----> Caching build
4/16/2017 2:46:21 PM    OUT STG Clearing previous node cache
4/16/2017 2:46:21 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:46:21 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG -----> Build succeeded!
4/16/2017 2:46:43 PM    OUT STG Exit status 0
4/16/2017 2:46:43 PM    OUT STG Staging complete
4/16/2017 2:46:43 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading droplet...
4/16/2017 2:46:44 PM    OUT STG Uploaded build artifacts cache (256B)
4/16/2017 2:46:51 PM    OUT STG Uploaded droplet (50.2M)
4/16/2017 2:46:51 PM    OUT STG Uploading complete
4/16/2017 2:46:51 PM    OUT STG Destroying container
4/16/2017 2:47:10 PM    OUT CELL    Successfully created container
4/16/2017 2:47:17 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:47:18 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:47:20 PM    OUT CELL    Container became healthy

错误: 它就像它没有使用包指定的版本,然后它反复尝试一堆不同的构建。

4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG 
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223

应用日志

Done uploading
OK

Stopping app Speakey Pipeline in org SpeechDictation / space dev 
OK

Starting app Speakey Pipeline in org SpeechDictation / space dev 
Creating container
Successfully created container
Downloading app package...
Downloaded app package (44.3M)
Downloading build artifacts cache...
Downloaded build artifacts cache (262B)
Staging...
-------> Buildpack version 1.5.32

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=false
-----> Installing binaries
       engines.node (package.json):  7.8.x
       engines.npm (package.json):   unspecified (use default)

       Downloading and installing node 7.8.0...
       Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
-----> Restoring cache
       Skipping cache restore (disabled by config)
-----> Building dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
--- SECTION OF DEPENDENCIES I REMOVED FOR SPACE
       safe-buffer@5.0.1 /tmp/app/node_modules/safe-buffer
-----> Caching build
       Clearing previous node cache
       Skipping cache save (disabled by config)
-----> Build succeeded!
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (256B)
Uploaded droplet (49.1M)
Uploading complete
Destroying container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App Speakey Pipeline was started using this command `node app.js`

Showing health and status for app Speakey Pipeline in org SpeechDictation / space dev as 
OK

requested state: started
instances: 1/1
usage: 64M x 1 instances
urls: spekra.mybluemix.net
last uploaded: Sun Apr 16 15:53:50 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/nodejs-buildpack

     state     since                    cpu    memory         disk           details
#0   running   2017-04-16 03:55:33 PM   0.0%   30.6M of 64M   284.1M of 1G
Sending deployment success of Speakey Pipeline to IBM DevOps Services...
IBM DevOps Services notified successfully.
FAILED

【问题讨论】:

  • 我的版本可能太高了;所以我正在尝试这个:stackoverflow.com/questions/38047718/…
  • 您能突出显示错误吗? (可能想查看应用程序日志?)
  • @majidarif 刚刚更新了票证。有点奇怪。就像它在尝试不同的场景一样,它会启动并运行它,然后让它崩溃。
  • 我已尝试将 package.json 节点版本更改为所有受支持的版本,并且得到相同的错误。
  • @majidarif 刚刚添加了应用日志

标签: node.js express ibm-cloud


【解决方案1】:

显然,最新版本的 nodejs buildpacks 仅支持 4.2.x;所以这是一个版本问题....

【讨论】:

    【解决方案2】:

    我在今年年初部署有关使用 Bluemix 和 Watson 服务的教程时遇到了类似的问题。我实施的修复是从我的 package.json 文件中删除引擎规范。这样,我确保 Bluemix 在部署我的应用程序时安装了它的默认引擎。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-25
      • 1970-01-01
      • 2017-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-15
      相关资源
      最近更新 更多