FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update package.json to use farmhash 3.3.1 by erikeldridge · Pull Request #2534 · firebase/firebase-admin-node · GitHub

Update package.json to use farmhash 3.3.1 - #2534

Merged
erikeldridge merged 2 commits into
masterfrom
farmhash-331
Apr 17, 2024
Merged

Update package.json to use farmhash 3.3.1#2534
erikeldridge merged 2 commits into
masterfrom
farmhash-331

Conversation

erikeldridge commented Apr 17, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

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 ... farmhash@3.3.0 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 changed the title Update package-lock to use farmhash 3.3.1 Update package.json to use farmhash 3.3.1 Apr 17, 2024

lahirumaramba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you, Erik!

erikeldridge merged commit fb7c13f into master Apr 17, 2024
erikeldridge deleted the farmhash-331 branch April 17, 2024 18:28

Copy link
Copy Markdown

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL