質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

Q&A

1回答

578閲覧

nodejsアプリケーションのheroku openでのapplication eroor

fujisyo

総合スコア4

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

0グッド

0クリップ

投稿2020/01/23 06:37

前提・実現したいこと

javascriptとhtmlで作成したアプリをherokuでデプロイした際にapplicationerrorがでてしまいます。

発生している問題・エラーメッセージ

State changed from crashed to starting    heroku[web.1]: Starting process with command `npm start`    heroku[web.1]: State changed from starting to crashed heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mapionmapion.herokuapp.com request_id=1ca7bdfb-e619-4166-8abc-b68df85e5955 fwd="160.86.247.138" dyno= connect= service= status=503 bytes= protocol=https

該当のソースコード

package.json { "name": "weather_navi", "version": "1.0.0", "description": "", "main": "index.html", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/fujisyo/weather_navi.git" }, "author": "", "license": "ISC", "bugs": { "url": "https://github.com/fujisyo/weather_navi/issues" }, "homepage": "https://github.com/fujisyo/weather_navi#readme" } Procfile web: node ./bin/www index.php <?php include_once("index.html"); ?>

試したこと

package.jsonのなかみを{}のみにしてみたりとしましたがエラーの内容は変わりませんでした。

補足情報(FW/ツールのバージョンなど)

Qiitaでアプリとして認識されていないからという記事を見たので、index.phpを作成しphpのアプリとしてデプロイしました。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

node.jsとnpmのバージョンを指定する必要があるみたいです。

以下参考
Heroku keep crashing after Starting process with command `npm start'

投稿2020/01/23 07:45

okusan

総合スコア7

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

fujisyo

2020/01/23 08:17

いただいた記事を参考にバージョンを指定してみたところ、デプロイ時に下記のようなエラーがでてしまいました。 App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-nodejs#v166 remote: remote: ! ERROR: Application not supported by 'heroku/nodejs' buildpack remote: ! remote: ! The 'heroku/nodejs' buildpack is set on this application, but was remote: ! unable to detect a Node.js codebase. remote: ! remote: ! A Node.js app on Heroku requires a 'package.json' at the root of remote: ! the directory structure. remote: ! remote: ! If you are trying to deploy a Node.js application, ensure that this remote: ! file is present at the top level directory. This directory has the remote: ! following files: remote: ! remote: ! _navi/ remote: ! weather_api/ remote: ! remote: ! If you are trying to deploy an application written in another remote: ! language, you need to change the list of buildpacks set on your remote: ! Heroku app using the 'heroku buildpacks' command. remote: ! remote: ! For more information, refer to the following documentation: remote: ! https://devcenter.heroku.com/articles/buildpacks remote: ! https://devcenter.heroku.com/articles/nodejs-support#activation remote:
okusan

2020/01/30 05:05

ディレクトリ構成は合ってますか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問