Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法将MEAN应用程序部署到Heroku,因为“;无法检测到此应用程序的默认语言;_Heroku - Fatal编程技术网

无法将MEAN应用程序部署到Heroku,因为“;无法检测到此应用程序的默认语言;

无法将MEAN应用程序部署到Heroku,因为“;无法检测到此应用程序的默认语言;,heroku,Heroku,我正在尝试将MEAN应用程序部署到Heroku,但由于以下错误而无法推送: ! No default language could be detected for this app. HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. See https://devcenter.heroku.com/art

我正在尝试将MEAN应用程序部署到Heroku,但由于以下错误而无法推送:

 !     No default language could be detected for this app.
        HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
        See https://devcenter.heroku.com/articles/buildpacks
!     Push failed
我尝试使用node.js buildpack的最新版本设置node.js buildpack,但刚刚收到另一个错误:

failed to detect buildpack
这是我第一次部署到Heroku,所以我在这方面是全新的

以下是我的package.jsons:

服务器 客户 为什么Heroku没有检测到节点?

根据

为了确定如何启动你的应用程序,Heroku首先查找Procfile。 如果Node.js应用程序不存在Procfile,我们将尝试启动 通过package.json中的启动脚本执行默认web进程

因此,您不需要设置构建包。

根据

为了确定如何启动你的应用程序,Heroku首先查找Procfile。 如果Node.js应用程序不存在Procfile,我们将尝试启动 通过package.json中的启动脚本执行默认web进程


所以您不需要设置构建包。

我有两个package.json,一个用于客户端,一个用于服务器。我需要将服务器依赖项放入根文件夹(它们分别嵌套在客户机和服务器文件夹中)。把它移到树根里,heroku就能发现它。当然,现在我有一个新错误。:)

我有两个package.json,一个用于客户端,一个用于服务器。我需要将服务器依赖项放入根文件夹(它们分别嵌套在客户机和服务器文件夹中)。把它移到树根里,heroku就能发现它。当然,现在我有一个新错误。:)

嗯,好的。我安装它是因为我最初收到此错误:!无法检测到此应用的默认语言。提示:当Heroku无法自动检测用于此应用程序的构建包时,会发生这种情况。看见推送失败尝试在
package.json
中设置启动脚本。像
“scripts”:{“start”:“node server.js”}
。我添加了我的package.jsons,这样人们可以看到我的依赖项。我尝试更改脚本的开始,但始终收到相同的错误。您将无法在Heroku上使用
nodemon
。只需使用
节点。/bin/www
。由于这是您的第一次部署,因此可能值得尝试
ZFR
zero功能发布,这只是使节点应用程序运行的最低代码,然后添加您的应用程序功能。嗯,好的。我安装它是因为我最初收到此错误:!无法检测到此应用的默认语言。提示:当Heroku无法自动检测用于此应用程序的构建包时,会发生这种情况。看见推送失败尝试在
package.json
中设置启动脚本。像
“scripts”:{“start”:“node server.js”}
。我添加了我的package.jsons,这样人们可以看到我的依赖项。我尝试更改脚本的开始,但始终收到相同的错误。您将无法在Heroku上使用
nodemon
。只需使用
节点。/bin/www
。由于这是您的第一次部署,因此可能值得尝试
ZFR
zero功能发布,这只是运行节点应用程序的最低代码,然后添加应用程序功能。
{
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "bcrypt": "^1.0.2",
    "body-parser": "^1.16.1",
    "cookie-parser": "^1.4.3",
    "cors": "^2.8.2",
    "debug": "^2.6.3",
    "ejs": "~2.5.5",
    "express": "^4.14.1",
    "jsonwebtoken": "^7.3.0",
    "mongoose": "^4.9.2",
    "morgan": "^1.7.0",
    "multer": "^1.3.0",
    "passport": "^0.3.2",
    "passport-jwt": "^2.2.1",
    "request": "^2.81.0",
    "request-promise": "^4.2.0",
    "serve-favicon": "^2.3.2"
  }
}
{
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.4.0",
    "@angular/compiler": "^2.4.0",
    "@angular/core": "^2.4.0",
    "@angular/forms": "^2.4.0",
    "@angular/http": "^2.4.0",
    "@angular/platform-browser": "^2.4.0",
    "@angular/platform-browser-dynamic": "^2.4.0",
    "@angular/router": "^3.4.0",
    "@types/googlemaps": "^3.26.8",
    "@types/jquery": "^2.0.43",
    "@types/lodash": "^4.14.62",
    "@types/underscore": "^1.8.0",
    "amcharts3-angular2": "github:amcharts/amcharts3-angular2",
    "angular2-google-maps": "^0.17.0",
    "core-js": "^2.4.1",
    "dotenv": "^4.0.0",
    "jquery": "^3.2.1",
    "lodash": "^4.17.4",
    "ng2-google-charts": "^2.1.0",
    "rxjs": "^5.1.0",
    "tslint": "^4.4.2",
    "typescript": "^2.0.10",
    "underscore": "^1.8.3",
    "zone.js": "^0.7.6"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0-rc.0",
    "@angular/compiler-cli": "^2.4.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.4.2",
    "typescript": "~2.0.0"
  }
}