简体   繁体   English

即使应用程序不是.NET,部署也会因.NET错误而失败

[英]Deployment fails with .NET error even though the app is NOT .NET

I have had an app running for some time on Bluemix. 我有一个应用程序在Bluemix上运行了一段时间。 When I tweaked something small in one of the web pages & rebuilt/redeployed, it failed with the following message in the log: "The project app does not specify any target frameworks in /tmp/staged/app/project.json." 当我在其中一个网页中进行细微调整并重新构建/重新部署时,它失败并在日志中显示以下消息:“项目应用程序未在/tmp/staged/app/project.json中指定任何目标框架。”

The log indicates that it's trying to do stuff with .NET, saying "Installing dotnet CLI" among others. 该日志表明它正在尝试使用.NET进行操作,其中包括“安装dotnet CLI”。 It looks like the issue is a sudden desire, on the part of the build process, to include some ASP.NET features, even though it's all node.js and I definitely absolutely do not want any of that .NET stuff near my app. 看起来,在构建过程中,这个问题是突然想要包括一些ASP.NET功能的,即使这全是node.js,我绝对不希望在我的应用程序中包含任何.NET内容。

The problem is that the .NET buildpack is detecting your application before it gets to the NodeJS buildpack, you can force it to use the NodeJS buildpack by specifying that buildpack from the command-line like so: 问题在于,.NET buildpack在到达NodeJS buildpack之前正在检测您的应用程序,您可以通过从命令行指定该buildpack来强制其使用NodeJS buildpack,如下所示:

cf push <app_name> -b sdk-for-nodejs

Alternatively, you can provide a manifest.yml file in your application which will also specify the buildpack to be used. 或者,您可以在应用程序中提供manifest.yml文件,该文件还将指定要使用的buildpack。 The format of that file would be similar to this: 该文件的格式与此类似:

---
applications:
- name: <app_name>
buildpack: sdk-for-nodejs

In both cases you would replace <app_name> with the actual name of your app that you want to use in Bluemix. 在这两种情况下,您都将<app_name>替换为要在Bluemix中使用的应用程序的实际名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM