I can see from your commit history that you have tried different URL types for the package, are you getting the same error no matter what type of URL you have used?
It should work with the original URL that is in the package.json file. Even just the
user/repo format should work.
Anytime you change the URL you have to run npm install to update the lock file otherwise it won’t get updated and Heroku may just be using the lock file.
As an example right now you have this in your package.json
"start": "npm install && node server.js"
But this is in the lock file.
"license": "(BSD-3-Clause AND CC-BY-SA-4.0)"
As you can see they do not match. Try using the normal URL or
user/repo version and update the lock file.
Otherwise, maybe try just deleting the package-lock.json file and see if that helps with the Heroku install.
Edit: here is a related issue.
01:42PM - 05 Apr 21 UTC
05:53PM - 14 Dec 21 UTC
**Describe the bug**
Unable to install any dependency from Github instead of NP
Steps to reproduce the behavior:
1. Install any dependency from github, e.g.: `npm install uuidjs/uuid`
2. Publish the code to heroku
4. See error
-----> Installing dependencies
Installing node modules
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://firstname.lastname@example.org/uuidjs/uuid.git
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.dwGuD/_logs/2021-04-05T13_39_09_824Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
If you're stuck, please submit a ticket so we can help:
! Push rejected, failed to compile Node.js app.
! Push failed
**Versions (please complete the following information):**
- Heroku Stack: `heroku-20`
- Node Version: `14.16.0`
- NPM or Yarn Version: `NPM 6.14.11`
- Buildpack Version: `heroku/nodejs v183`
If you can’t get it to work with Heroku I would suggest you just use Replit instead.