The ultimate goal is to deploy,
- How to solve the current error
- Why is this error occurring?
Want to figure out.
Currently, I can push to heroku from github, but it is displayed on the web page as follows.
Application error
An error occurred in the application and your page could not be served.If i am the application owner, check your logs for details.You can do this from the Heroku CLI with the command
According to this content, I check the log with heroku logs, but it is swept away by the torrent of letters.
At the moment, I don't understand much about the entry points, but I think that I am not able to understand the problem because I cannot solve the problem.
I don't understand where the problem came from, so I will start from the beginning when the problem starts.
First, the log is displayed as follows, and the problem seems to be npm ERR! missing script: start
I think that it is in one sentence, but,
2020-07-19T02:44:42.000000+00:00 app[api]: Build succeeded
2020-07-19T02:44:56.126893+00:00 heroku[web.1]: Starting process with command `npm start`
2020-07-19T02:44:58.985426+00:00 app[web.1]: npm ERR! missing script: start2020-07-19T02:44:59.010559+00:00 app[web.1]:
2020-07-19T02:44:59.011756+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-07-19T02:44:59.012090+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-07-19T02_44_58_986Z-debug.log
2020-07-19T02:44:59.099353+00:00 heroku[web.1]: Process exited with status 1
2020-07-19T02:44:59.143423+00:00 heroku[web.1]: State changed from starting to crashed
2020-07-19T02:45:01.715572+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ucs5.herokuapp.com request_id=5c17f944-d57f -4616-907a-5bb660904efa fwd="182.20.230.97" dyno= connect= service= status=503 bytes= protocol=https
2020-07-19T02:45:02.096137+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ucs5.herokuapp.com request_id= 05f1d2cc-2478-421b-a50e-e72b82af81b0 fwd="182.20.230.97" dyno= connect= service= status=503 bytes= protocol=https
When I check this error, I have the same QandA at the following URL,
https://stackoverflow.com/questions/34631300/error-when-deploying-app-to-heroku
According to this I need to tell Heroku where to start, in package.json:
"scripts": {
"start": "node index.js"
}
This description is necessary, and it was the content that index.js is the entry point. Therefore, enter the following code
"scripts": {
"start": "node ./javascript/channels/index.js" // directory where index.js is stored
}
I ran it with commit ->push ->git push heroku, but I still can't open it, and the log shows something like this:
Error: Cannot find module'/app/javascript/channels/index.js'
I don't know if there's a problem with the way the code is written or with something else.
Even if the deployment itself succeeds, it will not be rendered due to the above error. Although there is a solid file in the part corresponding to this error, it is not recognized by all means.
First of all, I only understand the characters.
Where to start executing the program =>the first program to execute when a server-side request comes in
In this case, the top page is displayed, isn't it?
When the contents set in root are reflected, js is executed first to access the model when reading the view?
The following is described in index.js, suggesting that it is the first file to be read.
// Load all the channels within this directory and all subdirectories.
So I read all the files, soft understanding.
-
Answer # 1
-
Answer # 2
What is worrisome about the error message
'/app/javascript/channels/index.js'
so,
'app/javascript/channels/index.js'
That is not the case.
Please show the file that specifies index.jsAlso, there is rails6 in TAG, but I am happy that Rails and Ruby versions are also included in the text.
Related articles
- ruby - rails heroku deploy error
- ruby - failed to deploy to heroku i would like to ask for your help (the cause is bundler ???)
- ruby - unable to deploy to heroku
- ruby - unable to deploy to heroku (nomethoderror)
- ruby - heroku deploy error
- ruby - rails app can't deploy to heroku
- ruby on rails - cannot deploy to heroku
- ruby on rails - i want to start the puma server and deploy the rails app
- ruby - i can't add sendgrid to heroku so i can't use devise's email function
- ruby - aws deploy fatal: protocol'github: https' is not supported error
- mysql - i want to be able to open an app with an elastic address
- ruby on rails - can't connect to local mysql server through socket'/tmp/mysqlsock' (2 "no such file or director error"
- ruby - unable to create app database on heroku
- ruby - causes of mysql error when starting unicorn on ec2
- ruby on rails - i can't install heroku cli on ubuntu [error during apt-get update? ]
- when i edit a js file in a php app that does not use fw and deploy it on heroku, it is not reflected
- ruby - i want to reset the heroku database!
- ruby on rails - unknown mysql server host'db' (0) error persists
- ruby on rails - how to always start heroku (original domain)
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
Although it is different from the above flow, it was solved by putting the source code of Bootstrap itself in the javascript directory and compiling.