Skip to main content

I’ve been trying all day to install the RevenueCat extension, but no luck. This is the error I’m getting:

; RESOURCE_ERROR at /deployments/firebase-ext-firestore-revenuecat-purchases/resources/handler: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":"Gen1 operation for function projects/f1-live-pulse-27147/locations/us-central1/functions/ext-firestore-revenuecat-purchases-handler failed: Build failed: npm error code EUSAGE\nnpm error\nnpm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.\nnpm error\nnpm error Invalid: lock file's long@5.2.3 does not satisfy long@5.2.4\nnpm error Invalid: lock file's long@5.2.3 does not satisfy long@5.2.4\nnpm error Invalid: lock file's long@5.2.3 does not satisfy long@5.2.4\nnpm error\nnpm error Clean install a project\nnpm error\nnpm error Usage:\nnpm error npm ci\nnpm error\nnpm error Options:\nnpm error r--install-strategy <hoisted|nested|shallow|linked>] t--legacy-bundling]\nnpm error r--global-style] l--omit <dev|optional|peer> g--omit <dev|optional|peer> ...]]\nnpm error r--include <prod|dev|optional|peer> g--include <prod|dev|optional|peer> ...]]\nnpm error r--strict-peer-deps] p--foreground-scripts] t--ignore-scripts] t--no-audit]\nnpm error r--no-bin-links] k--no-fund] n--dry-run]\nnpm error r-w|--workspace <workspace-name> g-w|--workspace <workspace-name> ...]]\nnpm error r-ws|--workspaces] e--include-workspace-root] o--install-links]\nnpm error\nnpm error aliases: clean-install, ic, install-clean, isntall-clean\nnpm error\nnpm error Run \"npm help ci\" for more info\nnpm error A complete log of this run can be found in: /www-data-home/.npm/_logs/2025-01-10T14_45_06_171Z-debug-0.log; Error ID: 7fa33aaa."}

 

 

Solved

  1. Clone the Github repo
  2. Run the following commands
    cd functions && npm install && cd ..

     

  3. Run this replacing your Firebase project-id and follow the prompts

    firebase ext:install . --project cproject-id]

     

  4. Run this and accept 
    firebase deploy --only extensions

     


Worked here as well! Many thanks @simone. 


Thanks for posting this. I cannot for the life of me get this to install, I have the same error as you.

I can clone the repo and run 

cd functions && npm install && cd ..

without any issue. It does appear that its trying to create a new project though, instead of using my existing project when I run 

firebase ext:install . --project tproject-id]

Which then causes firebase deploy --only extensions to produce the error:

 

Error: Request to https://cloudresourcemanager.googleapis.com/v1/projects/revenuecat-xxxx had HTTP Error: 403, The caller does not have permission

 

Any thoughts?
 


Hi! Had the same, but when I changed (renamed) the project in the file below to my project, it succeeded:

firestore-revenuecat-purchases/extensions/firestore-revenuecat-purchases.env


@mitchel-32fd79 Interesting, my env file, doesn’t have anything mentioning my project other than REVENUECAT_SHARED_SECRET. Did you have  PROJECT env var?


Hi ​@mb-3aced2 ! I went back to the project to verify, I’m sorry I shared the wrong file. It was in the ‘.firebaserc’ which is an hidden file in the main ‘firestore-revenuecat-purchases’ folder. There I changed the project and was able to deploy the extension. It is now working fine.


Reply