Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot read property 'branch' of undefined during npm install #37

Open
jeffcutsinger opened this issue Nov 20, 2019 · 0 comments
Open

Comments

@jeffcutsinger
Copy link

A workaround exists for this issue: make sure you are using git to clone the matrix-puppet-signal
repository
rather than downloading an archive from github.

I ran into a weird problem while installing the bridge inside docker. Instead of doing git clone https://... I did wget https://.../archive/... -O- | tar -xz -f -. During npm install, I'd get this error:

Running "gitinfo" task

Running "getExpireTime" task
Warning: Cannot read property 'branch' of undefined Use --force to continue.

Aborted due to warnings.
error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! matrix-puppet-signal@2.0.0 postinstall: `cd node_modules/signal-desktop && yarn && yarn grunt`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the matrix-puppet-signal@2.0.0 postinstall script.

This is happening during the build of the signal-desktop package. Its getExpireTime task requires the gitinfo task to pull the commit time of the current branch of the signal-desktop git repository, which does not exist in the npm install context. However, if you clone the matrix-puppet-signal git repository, git will pull the information from that repository instead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant