Skip to content

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

@jeffcutsinger

Description

@jeffcutsinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions