As things stand, you are cargo cult programming.
Heroku is not a good fit for this: what you have is a static webpage with a few scripts. Heroku is good for Node applications; this is not a Node application.
Heroku is expecting a published package called
random-quote-machine on NPM - it’s trying to download it.
In your package.json, that
node your-script.js is saying run
your-script.js in the root of your project. Heroku would expect
your-script.js to be the entry point that starts a server you have written.
I don’t think you’re doing either of these things. Heroku is likely to be complicated overkill for the extremely simple thing you’re trying to do.
You have an HTML file, a script, a CSS file, and a few scripts as dependencies. GitHub Pages is a perfect fit because that’s what it’s designed for.
As I said in the first post, you can use a CDN to get the scripts. You don’t need to use NPM, you don’t need Node modules, they are just complicating things.
node_modules isn’t there just as just a place to put front end script libraries. If you do not understand why you need something you probably do not need it. This kinda setup is much much easier:
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<!-- CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/octicons.min.css" rel="stylesheet" type="text/css">
<link href="https://link/to/my/styles.css" rel="stylesheet" type="text/css">
<!-- JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" defer></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" defer></script>
<script src="https://link/to/my/script.js" defer></script>
<title>Random Quote Generator</title>
<!-- Your HTML here -->
If you want the scripts locally instead of using a CDN, literally copy the scripts into a folder in your project-
myProject/js/bootstrap.js and link as described in my first post. You are overcomplicating things greatly here