【问题标题】:Cloudfoundry : Cannot push NodeJS app to BluemixCloudfoundry:无法将 NodeJS 应用程序推送到 Bluemix
【发布时间】:2016-05-24 00:02:22
【问题描述】:

我正在尝试推动 Kibana

https://www.elastic.co/products/kibana

通过 cloudfoundry 到 Bluemix PaaS。在 cf push 我得到这个错误

Error uploading application.
GetFileAttributesEx C:\Users\asd\qwe\zxc\installedPlugins\shield\node_modules\eslint\node_modules\file-entry-cache\node_modules\flat-cache\node_modules\del\node_modules\globby\node_modules\glob\node_modules\inflight\node_modules\wrappy\package.json: The system cannot find the path specified.

我可以看到 package.json 实际上存在于该路径中!我该如何解决这个问题?

cf --version
cf version 6.12.4-b4b6af1-2015-09-18T10:55:12+00:00

【问题讨论】:

    标签: node.js ibm-cloud cloud-foundry


    【解决方案1】:

    错误是由于文件路径太长。将 node_modules 目录添加到应用根目录中的 .cignore 文件中,然后再次推送。 node_modules 不会被上传,而是作为暂存过程的一部分安装。

    有关 .cignore 示例,请参阅 https://github.com/IBM-Bluemix/nodejs-cloudant/blob/master/.cfignore

    你也可以切换到 npm v3 来保持 node_modules 目录更扁平,但你仍然不会通常用你的应用推送它。

    【讨论】:

    • 所以我创建了一个名为 .cfignore 的文件,它只有一行。节点模块
    • 我添加了文件,但仍然收到错误消息。我必须先退出 cf 吗?
    • 但我创建的文件是 utf-8 格式。我在记事本++中配置了它
    • 您有最新的 cf CLI 吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-21
    相关资源
    最近更新 更多