gpt4 book ai didi

node.js - 在 IBM Bluemix 上部署 Nodejs 应用程序时出错

转载 作者:搜寻专家 更新时间:2023-11-01 00:20:04 24 4
gpt4 key购买 nike

我正在尝试在 IBM Bluemix 上部署应用程序,但出现错误。

这是我得到的错误:

prateek@localhost:~/get-started-node> cf push
Pushing from manifest to org prateekagrawal89760@gmail.com / space dev as prateekagrawal89760@gmail.com...
Using manifest file /home/prateek/get-started-node/manifest.yml
Getting app info...
Updating app with these attributes...
name: GetStartedNode
path: /home/prateek/get-started-node
disk quota: 1G
health check type: port
instances: 1
memory: 256M
stack: cflinuxfs2
routes:
getstartednode-brave-eland.eu-gb.mybluemix.net

Updating app GetStartedNode...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
15.35 KiB / 15.35 KiB [=======================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
-----> IBM SDK for Node.js Buildpack v3.18-20180206-1137
Based on Cloud Foundry Node.js Buildpack v1.5.24
-----> Creating runtime environment

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

Resolving node version 6 via 'node-version-resolver'
Installing IBM SDK for Node.js (6.12.3) from cache
Using default npm version: 3.10.10
-----> Restoring cache
Skipping cache restore (new runtime signature)
-----> Building dependencies
Installing node modules (package.json)
npm ERR! Linux 4.4.0-109-generic
npm ERR! argv "/tmp/app/vendor/node/bin/node" "/tmp/app/vendor/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/app/.npmrc"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10
npm ERR! code EREADFILE

npm ERR! Error extracting /home/vcap/.npm/cloudant/1.9.0/package.tgz archive: ENOENT: no such file or directory, open '/home/vcap/.npm/cloudant/1.9.0/package.tgz'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/app/npm-debug.log
-----> Build failed


Failed to compile droplet: Failed to compile droplet: exit status 1
Exit status 223
Staging failed: STG: Exited with status 223
Stopping instance 8470cd8b-064c-4fb3-99a7-89e5e7c36038
Destroying container
Successfully destroyed container
Error staging application: App staging failed in the buildpack compile phase
FAILED

你可以从这里看到完整的应用程序:

https://drive.google.com/open?id=1u88Ypf-bupBjD4ONuFgkyUD1qBBAgciQ

我从这里开始学习本教程 https://console.bluemix.net/docs/runtimes/nodejs/getting-started.html#getting-started-tutorial

首先,我安装了 Cloud Foundry CLI 6.34.1。我使用以下方式登录我的计算机:

cf login

我按照文档中给出的说明进行操作,但仍然出现错误。这个错误到底是什么,我该如何解决?

最佳答案

尝试将 package.json 中的 cloudant 版本更改为 "1.7。 1”。它解决了我的问题。您也可以尝试任何更新的版本。

您可以使用 npm view cloudant versions 检查可用版本。

关于node.js - 在 IBM Bluemix 上部署 Nodejs 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48848643/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com