If we deploy a node.js 12 project to App Engine (standard environment) and it has a dependency in package.json
that looks like this:
"some-lib": "git+https://github.com/a/b.git",
Then this will lead to a deployment error when we execute gcloud app deploy
. This is from the App Engine logs:
Step #6 - "builder": npm ERR! Error while executing:
Step #6 - "builder": npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/a/b.git
Step #6 - "builder": npm ERR!
Step #6 - "builder": npm ERR! Host key verification failed.
Step #6 - "builder": npm ERR! fatal: Could not read from remote repository.
So even though the dependency is provided as a HTTPS URL, it will try to fetch it with SSH and this doesn't seem to work on App Engine.
It works if I go to package-lock.json and manually change the version string to start with https, but that's not really a viable solution, because it will be overwritten again.
Any ideas how it can be accomplished to provide a dependency with a GitHub URL (SSH or HTTPS) to App Engine?