Build fail on render, success on local

Hi,

I’ve just connect my Parse Server on github to render.com in a Web Service. The build command is “yarn build”

I can build successfully on my local machine, but it fails on render. What should i do?

Thanks

Hi there,

Thanks for reaching out.

You don’t seem to be installing dependencies, I would guess your Build Command should be more like yarn; yarn build.

Hope that helps

Alan

1 Like

Thanks. That helps with the installation (I’ve also tried with shell). However, I got this error

Nov 4 09:20:38 AM ==> Running build command ‘yarn; yarn build’…
Nov 4 09:20:38 AM yarn install v1.22.5
Nov 4 09:20:38 AM [1/4] Resolving packages…
Nov 4 09:20:41 AM [2/4] Fetching packages…
Nov 4 09:20:41 AM warning Pattern [“debug@>= 2.6.9 < 3.0.0 || >= ^3.1.0”] is trying to unpack in the same destination “/opt/render/.cache/v6/npm-debug-3.2.7-integrity/node_modules/debug” as pattern [“debug@^3.1.0”,“debug@^3.2.7”,“debug@^3.2.7”]. This could result in non-deterministic behavior, skipping.
Nov 4 09:21:14 AM error Command failed.
Nov 4 09:21:14 AM Exit code: 128
Nov 4 09:21:14 AM Command: git
Nov 4 09:21:14 AM Arguments: ls-remote --tags --heads ssh://git@github.com/mongodb-js/mongodb-tools.git
Nov 4 09:21:14 AM Directory: /opt/render/project/src
Nov 4 09:21:14 AM Output:
Nov 4 09:21:14 AM Host key verification failed.
Nov 4 09:21:14 AM fatal: Could not read from remote repository.
Nov 4 09:21:14 AM
Nov 4 09:21:14 AM Please make sure you have the correct access rights
Nov 4 09:21:14 AM and the repository exists.
Nov 4 09:21:14 AM info Visit yarn install | Yarn for documentation about this command.
Nov 4 09:21:18 AM yarn run v1.22.5
Nov 4 09:21:18 AM $ tsc
Nov 4 09:21:18 AM /bin/sh: 1: tsc: not found
Nov 4 09:21:18 AM error Command failed with exit code 127.
Nov 4 09:21:18 AM info Visit yarn run | Yarn for documentation about this command.
Nov 4 09:21:18 AM ==> Build failed :disappointed:

It seems that I cannot install mongodb tools. What should I do?

It looks like you’re trying to install a package direct from git over ssh, could try appending this to your Build Command to tell git to use https instead?

git config --global url."https://github".insteadOf ssh://git@github

So your Build Command would be:

git config --global url."https://github".insteadOf ssh://git@github; yarn; yarn build

Alan

That’s perfect. It builds :slight_smile:

Thanks a lot

Had the same issue, but the fix above didn’t fix my issue. Reached out to support, and they helped. If anyone else has the same problem, try this:

Static Sites will attempt to install dependencies automatically, so that is being run before hitting the git config in your Build Command.

You can disable the auto dependency install by setting an environment variable of SKIP_INSTALL_DEPS with a value of true .

Your build command will then be the only command run. It would need to be:

git config --global url."https://github".insteadOf ssh://git@github; npm install; npm run build;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.