question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Postinstall hook fails on heroku deployments (0.68.0)

See original GitHub issue

Description

The installation / compilation fails on heroku deployments. It seems to happen, because the slug-preparation happens in a temp folder, that is not a GIT repo

Steps to Reproduce

Try installing mathlive in a non-GIT folder and it should fail.

Like:

$ mkdir blub
$ cd blub
$ yarn init
$ yarn add mathlive@0.68.0
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /blub/node_modules/mathlive: Command failed.
Exit code: 128
Command: git config core.hooksPath ./git-hooks
Arguments:
Directory: blub/node_modules/mathlive
Output:
fatal: not in a git directory

Workaround

Running git init seems to fix this issue.

Actual Behavior

remote: [4/4] Building fresh packages...
remote: error /tmp/build_0d633e20/typescript/node_modules/mathlive: Command failed.
remote: Exit code: 128
remote: Command: git config core.hooksPath ./git-hooks
remote: Arguments:
remote: Directory: /tmp/build_0d633e20/typescript/node_modules/mathlive
remote: Output:
remote: fatal: not in a git directory

The command listed seems to be coming from https://github.com/arnog/mathlive/blob/master/package.json#L25

"postinstall": "git config core.hooksPath ./git-hooks"

Expected Behavior

It should compile correctly, as it did previously.

Environment

MathLive version 0.68.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mindreframercommented, Jun 1, 2021

@arnog Thanks for the quick response!

I can totally relate to the pain of using Git submodules, there are so many gotchas… I hope this is not a big and dramatic change, since this is also a concern to everyone who is not using Git for version control (unlikely, but still possible).

Looking forward to use the fixed version and thank you a lot for this monumental effort of maintaining mathlive!

0reactions
mindreframercommented, Jun 2, 2021

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js Heroku Deployment - Fails To Exec Postinstall Script ...
Deployment of my Node.js MEAN app to heroku fails with the following errors. I can't figure out what is wrong with the bower...
Read more >
Deploy Hooks | Heroku Dev Center
Use deploy hooks to receive a notification whenever a new version of an app is pushed to Heroku. Available for email, IRC, Basecamp, ......
Read more >
Deploying React Node TypeScript App On Heroku with Github ...
In package.json, create a post install script to compile TypeScript files to JavaScript. ... I was getting this error on Heroku when deploying...
Read more >
I am deploying laravel project on heroku, but when I write “git ...
ERROR: Dependency installation failed! remote: ! remote: ! The 'composer install' process failed with an error. The cause remote: ! may be the ......
Read more >
Heroku deployment failing - GoRails
I am trying to deploy this app to heroku. i get this error with the ... remote: Post-install message from paperclip: ... remote:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found