Missing Script "Start" - heroku

I've deployed my bot's files but in the logs it says
2020-07-08T18:00:47.754261+00:00 app[web.1]: npm ERR! missing script: start
2020-07-08T18:00:47.762967+00:00 app[web.1]:
2020-07-08T18:00:47.763212+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-07-08T18:00:47.763312+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-07-08T18_00_47_755Z-debug.log

Heroku uses the start script, if no Procfile exists.
Useful links:
Procfile
Heroku Docs
npm docs

Related

no such file or directory, open '/app/package.json'

Having a few deployment issue here...
As my nodejs app in github is not in the root directory (its in a graphql dir), I added a top level .buildpacks file with the following content:
graphql=https://github.com/heroku/heroku-buildpack-nodejs.git
After I tried a build there was no sign of any dynos in my app so I added a top level Procfile with contents:
web: npm start
When I deployed again, now there does seem to be a dyno (it says 'This app is using free dynos' in the overview section), however the app is still goosed :
2022-07-06T11:44:06.316635+00:00 app[api]: Deploy 79e3037a by user x#gmail.com
2022-07-06T11:44:23.060054+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-06T11:44:25.159819+00:00 app[web.1]: npm ERR! code ENOENT
2022-07-06T11:44:25.160057+00:00 app[web.1]: npm ERR! syscall open
2022-07-06T11:44:25.160249+00:00 app[web.1]: npm ERR! path /app/package.json
2022-07-06T11:44:25.160789+00:00 app[web.1]: npm ERR! errno -2
2022-07-06T11:44:25.161801+00:00 app[web.1]: npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
2022-07-06T11:44:25.161850+00:00 app[web.1]: npm ERR! enoent This is related to npm not being able to find a file.
2022-07-06T11:44:25.161892+00:00 app[web.1]: npm ERR! enoent
2022-07-06T11:44:25.163062+00:00 app[web.1]:
2022-07-06T11:44:25.163202+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-07-06T11:44:25.163233+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-07-06T11_44_25_124Z-debug-0.log
2022-07-06T11:44:25.378220+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-06T11:44:25.299092+00:00 heroku[web.1]: Process exited with status 254
what am I missing?

I am getting a compilation error when I try to deploy my Phoenix Elixir app to Heroku

I am very unfamiliar with the deployment process and how to interpret the build log on Heroku. I'm trying to deploy my Phoenix Elixir app and have gone through the process as outlined on https://hexdocs.pm/phoenix/heroku.html. However, I am get the following error in my build logs:
npm ERR! Linux 4.4.0-1062-aws
npm ERR! argv "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/node" "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/npm" "run" "deploy"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! # deploy: `webpack --mode production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # deploy script 'webpack --mode production'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --mode production
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/assets/npm-debug.log
I've updated to the latest version of node.js and npm as the logs suggested.
Thanks!
The issue isn't with the version of node that you have locally. If you look at the logs it shows that heroku is trying to use node v6.9.2. That is a really old version of node that won't work. You need to use heroku-buildpack-phoenix-static so that you can define the node version the heroku is trying to use. Add the buildpack with the cli:
$ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
Then create a file phoenix_static_buildpack.config in your project root directory. In that file define the version of node to use:
node_version=12.18.1
This will tell heroku to use that version of node. After that try to redeploy and the issue should be resolved.
If you have more issues then check out the phoenix docs on deploying to heroku. It has a lot of useful information:
https://hexdocs.pm/phoenix/heroku.html

Heroku npm Build Error Logs Location

I've deployed my node web app to heroku. Its built but failed to start. Here's the first few lines of output:
2018-03-05T20:17:51.058817+00:00 heroku[web.1]: - Starting process with command `npm start`
2018-03-05T20:17:52.868249+00:00 app[web.1]: - npm ERR! missing script: start
2018-03-05T20:17:52.874771+00:00 app[web.1]: -
2018-03-05T20:17:52.874973+00:00 app[web.1]: - npm ERR! A complete log of this run can be found in:
2018-03-05T20:17:52.875068+00:00 app[web.1]: - npm ERR! /app/.npm/_logs/2018-03-05T20_17_52_869Z-debug.log
The error log goes on, but I'm trying to located the log location:
/app/.npm/_logs/2018-03-05T20_17_52_869Z-debug.log
How do I get to this?

error starting node app on heroku

im trying to push a mean stack project to heroku, but it wont start on heroku's server. it keeps giving me the following from the applications log:
2017-12-12T23:59:32.528690+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-12T23:59:32.529607+00:00 app[web.1]: npm ERR! atl#0.0.0 start:
`ng serve`
2017-12-12T23:59:32.529706+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-12T23:59:32.529925+00:00 app[web.1]: npm ERR!
2017-12-12T23:59:32.530127+00:00 app[web.1]: npm ERR! Failed at the
atl#0.0.0 start script.
2017-12-12T23:59:32.530306+00:00 app[web.1]: npm ERR! This is probably
not a problem with npm. There is likely additional logging output
above.
2017-12-12T23:59:32.535107+00:00 app[web.1]:
2017-12-12T23:59:32.535281+00:00 app[web.1]: npm ERR! A complete log
of this run can be found in:
2017-12-12T23:59:32.535429+00:00 app[web.1]: npm ERR!
/app/.npm/_logs/2017-12-12T23_59_32_531Z-debug.log
2017-12-12T23:59:32.626726+00:00 heroku[web.1]: State changed from
starting to crashed
2017-12-12T23:59:32.613442+00:00 heroku[web.1]: Process exited with
status 1
i don''t know where to look for this problem, please let me know if i need to upload any files to help with this error, thank you in advance.

Heroku detects my sinatra app as a node.js application and fails

Here's the directory structure for my sinatra application
➜ app-fin git:(master) ls
public/ views/ birthday_countdown.rb config.ru Gemfile Gemfile.lock Procfile web.rb
My Gemfile is
source 'https://rubygems.org'
gem 'sinatra'
gem 'thin'
the Procfile
web: bundle exec ruby web.rb -p $PORT
and the config.ru
$:.unshift File.expand_path("../", __FILE__)
require './web'
run Sinatra::Application
When I try to push to heroku I get this error,
-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.6.20
Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm ERR! Couldn't read dependencies.
npm ERR! Error: Invalid name: "Sinatra Class" may not start with '.' or contain %/#+: or whitespace
npm ERR! at /tmp/node-npm-cVE5/lib/utils/read-json.js:229:13
npm ERR! at /tmp/node-npm-cVE5/lib/utils/read-json.js:134:32
npm ERR! at P (/tmp/node-npm-cVE5/lib/utils/read-json.js:110:40)
npm ERR! at cb (/tmp/node-npm-cVE5/node_modules/graceful-fs/graceful-fs.js:36:9)
npm ERR! at [object Object].<anonymous> (fs.js:123:5)
npm ERR! at [object Object].emit (events.js:64:17)
npm ERR! at Object.oncomplete (fs.js:1190:12)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.32-346-ec2
npm ERR! command "/tmp/node-node-yUVv/bin/node" "/tmp/node-npm-cVE5/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_16s1spp2lcght
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_16s1spp2lcght/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
I am perplexed as to why it thinks that my app should use node.js, does anyone have any ideas as to how I can convince heroku that it is in fact a sinatra app.
Is it possible that you specified a node.js buildpack upon creating your app?
https://devcenter.heroku.com/articles/buildpacks
Since you have a proper Gemfile, it should be detected by the ruby buildpack first. Additionally, since you don't have a package.json file, Node.js should not be detected.

Resources