Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update package.json to use farmhash 3.3.1 #2534

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Update package.json to use farmhash 3.3.1 #2534

merged 2 commits into from
Apr 17, 2024

Conversation

erikeldridge
Copy link
Contributor

@erikeldridge erikeldridge commented Apr 17, 2024

Discussion

Version 12.1.0 of the Admin SDK added a dependency on a package called farmhash. This package has a dev dependency on python via node-gyp. The node-gyp package on older versions of Node looks for a binary called python. This results in npm install of the Admin SDK failing if it can't find a binary with that name ("env: python: No such file or directory").

Original error report: lovell/farmhash#47 (comment)

Fortunately, the owner of the farmhash package quickly added a prebuilt binary and released a version 3.3.1: lovell/farmhash#41

So, this PR updates the Admin SDK's package-lock.json to use farmhash version 3.3.1.

Folks can workaround this issue in the meantime by installing Python or aliasing an existing binary.

Testing

Steps to repro original issue:

  1. Use Node version 14: nvm use 14
  2. Perform a clean install: npm ci
  3. Observe error "No prebuilt binaries found ... env: python: No such file or directory ... [email protected] install: prebuild-install || node-gyp rebuild"
  4. Create Python virtual env named "venv" to define a local python binary: python3 -m venv ~/venv
  5. Activate virtual env: source ~/venv/bin/activate
  6. Repeat step 2
  7. Observe no error

With this change:

  1. Use Node version 14: nvm use 14
  2. Perform a clean install: npm ci
  3. Observe no error

API Changes

None

@erikeldridge erikeldridge changed the title Update package-lock to use farmhash 3.3.1 Update package.json to use farmhash 3.3.1 Apr 17, 2024
Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Erik!

@erikeldridge erikeldridge merged commit fb7c13f into master Apr 17, 2024
7 checks passed
@erikeldridge erikeldridge deleted the farmhash-331 branch April 17, 2024 18:28
@kossnocorp
Copy link

For anyone who is experiencing broken firebase-admin, edit your lock files to fix it: "farmhash": "^3.3.0" -> "farmhash": "^3.3.1".

A new firebase-admin will be much appreciated.

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

Successfully merging this pull request may close these issues.

6 participants