- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在尝试将构建的 React 应用程序部署到 Cloud Foundry。 React 没有什么特别之处,可以毫无问题地打包成一组静态文件。但是,当我尝试部署到 CF 时,出现以下错误:
16:24:44.467: [APP/PROC/WEB.0] bash: npm: command not found
16:24:44.519: [APP/PROC/WEB.0] Exit status 127
applications:
- name: whatever
path: build
memory: 64M
instances: 1
disk_quota: 1024M
buildpacks:
- https://github.com/cloudfoundry/staticfile-buildpack.git
build
内部进行部署。文件夹,我也试过包含 Node buildpack(我知道它不会工作,因为它没有指向
npm start
的指令)。
16:21:27.583: [STG.0] -----> Running go build supply
16:21:27.583: [STG.0] /tmp/buildpackdownloads/49e489d3547d6eb82fdd6227f8309290 ~
16:21:34.358: [STG.0] ~
16:21:34.389: [STG.0] -----> Staticfile Buildpack version 1.4.43
16:21:34.389: [STG.0] **WARNING**
16:21:34.389: [STG.0] !! !!
16:21:34.389: [STG.0] This application is being deployed on cflinuxfs2 which is being deprecated in April, 2019.
16:21:34.389: [STG.0] Please migrate this application to cflinuxfs3.
16:21:34.389: [STG.0] For more information about changing the stack, see https://docs.cloudfoundry.org/devguide/deploy-apps/stacks.html
16:21:34.389: [STG.0] !! !!
16:21:34.389: [STG.0] -----> Installing nginx
16:21:34.389: [STG.0] Using nginx version 1.15.12
16:21:34.389: [STG.0] -----> Installing nginx 1.15.12
16:21:34.389: [STG.0] Copy [/tmp/cache/final/dependencies/742479b4d3f80b641ae394b6c5699e126e53f25198dfbcd9a5e54b66413ecba0/nginx-1.15.12-linux-x64-cflinuxfs2-4d0440ef.tgz]
16:21:34.667: [STG.0] -----> Running go build finalize
16:21:34.667: [STG.0] /tmp/buildpackdownloads/49e489d3547d6eb82fdd6227f8309290 ~
16:21:38.930: [STG.0] ~
16:21:38.951: [STG.0] -----> Root folder /tmp/app
16:21:38.951: [STG.0] -----> Copying project files into public
16:21:38.954: [STG.0] -----> Configuring nginx
16:21:39.207: [API.1] Creating droplet for app with guid 3df28cf5-8faf-40ef-a4e7-4e9658df9926
16:21:40.395: [STG.0] Exit status 0
16:21:40.395: [STG.0] Uploading droplet, build artifacts cache...
16:21:40.396: [STG.0] Uploading build artifacts cache...
16:21:40.396: [STG.0] Uploading droplet...
16:21:40.780: [STG.0] Uploaded build artifacts cache (2.7M)
16:21:42.060: [STG.0] Uploaded droplet (3.1M)
16:21:42.062: [STG.0] Uploading complete
16:21:42.134: [STG.0] Cell 3a98d2c0-2583-48dd-aa40-b72fe78267cf stopping instance bd85c2ad-6a00-405f-bbf0-c96d429fda43
16:21:42.134: [STG.0] Cell 3a98d2c0-2583-48dd-aa40-b72fe78267cf destroying container for instance bd85c2ad-6a00-405f-bbf0-c96d429fda43
16:21:45.333: [STG.0] Cell 3a98d2c0-2583-48dd-aa40-b72fe78267cf successfully destroyed container for instance bd85c2ad-6a00-405f-bbf0-c96d429fda43
16:21:46.397: [API.1] Process has crashed with type: "web"
16:21:46.422: [API.1] App instance exited with guid 3df28cf5-8faf-40ef-a4e7-4e9658df9926 payload: {"instance"=>"60e81bb4-79cd-4a42-6101-359c", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 127", "crash_count"=>2, "crash_timestamp"=>1562358175613734337, "version"=>"7e7a157a-d48a-47fc-863b-80193bad0461"}
16:21:47.750: [API.4] Process has crashed with type: "web"
16:21:47.768: [API.4] App instance exited with guid 3df28cf5-8faf-40ef-a4e7-4e9658df9926 payload: {"instance"=>"9059dfda-9fec-4c82-4a11-1ab1", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 127", "crash_count"=>1, "crash_timestamp"=>1562358172401034750, "version"=>"7e7a157a-d48a-47fc-863b-80193bad0461"}
16:21:49.934: [API.1] Process has crashed with type: "web"
16:21:49.956: [API.1] App instance exited with guid 3df28cf5-8faf-40ef-a4e7-4e9658df9926 payload: {"instance"=>"7f4ddf22-07d6-4f3f-62c1-ca68", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 127", "crash_count"=>3, "crash_timestamp"=>1562358179064113054, "version"=>"7e7a157a-d48a-47fc-863b-80193bad0461"}
16:22:46.283: [CELL.0] Cell 14d1eaac-45f2-4f93-9995-d8d80b86693d creating container for instance 60e81bb4-79cd-4a42-6101-359c
16:22:47.099: [CELL.0] Cell 14d1eaac-45f2-4f93-9995-d8d80b86693d successfully created container for instance 60e81bb4-79cd-4a42-6101-359c
16:22:48.304: [CELL.0] Starting health monitoring of container
16:22:48.821: [APP/PROC/WEB.0] bash: npm: command not found
16:22:48.858: [APP/PROC/WEB.0] Exit status 127
16:22:48.864: [CELL/SSHD.0] Exit status 0
16:22:49.421: [CELL.0] Cell 14d1eaac-45f2-4f93-9995-d8d80b86693d stopping instance 60e81bb4-79cd-4a42-6101-359c
16:22:49.421: [CELL.0] Cell 14d1eaac-45f2-4f93-9995-d8d80b86693d destroying container for instance 60e81bb4-79cd-4a42-6101-359c
最佳答案
感谢上面的 Daniel Mikusa,我能够解决这个问题。在更改我的工作流以在同一容器上使用 Staticfile 构建包之前,我最初使用 Node buildpack 作为 Node 项目部署到 Cloud Foundry 上的这个特定命名的服务。我相信发生的事情是因为 Node buildpack 设置了一个启动命令,它仍然缓存在容器中,并且由于 Staticfile buildpack 没有覆盖它,它仍然存在。即使我删除并部署到同名服务,启动命令仍然存在。我完全按照 Daniel 所说的去做(新命名的服务,将我的 list 更改为简单地使用 -staticfile_buildpack
而不是任何 git 链接)并且没有任何问题。
关于reactjs - 将构建的 React 应用程序静态文件部署到 Cloud Foundry 似乎认为它是一个 Node 部署,即使使用 buildpack,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56908964/
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
class Person def name puts "Doharey" end end puts Person.class #=> this out puts Class puts
在 PHP 中,($myvariable==0)当 $myvariable 为零时,表达式的值为真;当 $myvariable 为 null 时,此表达式的值也为 true。如何排除第二种情况?我的意
正文 Oracle的一顿猛如虎操作,让开发者彻底失去了Java EE。Eclipse基金会则自立门户,另起炉灶开启Jakarta EE项目。 对于Jakarta EE,从它
我是 python 新手,建议我使用 Canopy。我正在努力跟进 with this tutorial ,但我陷入了 mahotas.imread 行。我收到一个错误,说以这个结尾: Full er
上下文是我们想要跟踪应用程序的用户行为,因为它具有不同的功能。 为此,我们创建了一个自定义 Angular Directive(指令),例如myFunctionality并将 HTML 部分包装到此指
我正在尝试在文本字段中实现 google Places api 的自动完成功能。这是我的代码: $(document).ready(function() { initialize(){ v
我在 Glassfish 3.1.1 中配置了一个新的 jdbcRealm 并打开了 FINEST 日志记录,当我尝试使用用户名和密码登录时,我得到以下信息。它提示我的 Web 应用程序映射到的领域是
问题是,即使我将线程设置为“thrd.IsBackground = false”,iis 也不认为它正在运行,即使这是一个长时间运行的进程。如果我不关闭应用程序池的空闲关闭,它将关闭,因为它认为它是空
我正在使用 OpenJDK 8(从 https://jdk.java.net/java-se-ri/8 下载并解压,添加到 PATH),并且遇到了证书错误。 经过调查,我意识到 cacerts 存在问
我基于 Firebase 制作了简单的后期制作项目。我将帖子保存到 Firebase 中,如下所示: let data = UIImageJPEGRepresentation(newPostImage
我觉得还是先说明情况比较好。 情况 我正在编写一些软件来过滤 Set 的 File。 过滤器如下:如果文件未隐藏,则将其添加到新的 Set。 问题在于 File.isHidden() 的当前行为如下:
我创建了一个 C++ DLL 函数,它使用多个数组来处理最终的图像数据。我正在尝试通过引用传递这些数组,进行计算,然后通过预分配数组中的引用将输出传回。在该函数中,我使用了 Intel Perform
我在 python 中有一个小应用程序,除了这个小问题之外,它工作得很好:它应该连续运行一个循环,直到用户通过按钮告诉它停止,但是当我点击开始按钮时,Windows 告诉我它不是回应。现在,如果我编写
代码运行正常,但我怎么会得到这个错误日志 错误日志: 08-28 08:44:24.281: E/MediaPlayer(32454): mOnVideoSizeChangedListener is
我有一个使用 Karma+Jasmine 和 JSHint 的 Grunt 设置。每当我在我的规范文件上运行 JSHint 时,我都会收到一系列“未定义”错误,其中大部分是针对 Jasmine 的内置
将以下代码保存到文件中,Ubuntu 14.04 正确地意识到它是 bash: #!/usr/bin/env bash awk '{print $1 $2}' my_file 然而,向 awk 添加关
以下代码返回 false import inspect print(inspect.isbuiltin(map)) 但是 map 功能在"built-in" functions下列出. 为什么会这样?
这是一段常见的示例代码: while (1) { print "foo\n"; } 永远打印“foo”。 perl foo.pl foo foo foo ... 和 while (0) { p
我对 Haskell 比较陌生,来自 F#(一种 Microsoft 语言)。 我已经从脚手架创建了一个 Yesod 项目,稍微玩了一下,调整了一些东西,但随后它停止工作,并显示此错误消息(在所有模块
我是一名优秀的程序员,十分优秀!