Skip to content

[frameworks] npm error during frameworks build when using firebase@^10.0.0 #6109

@ezracelli

Description

@ezracelli

When deploying hosting with web framework integration, firebase-tools forcefully adds firebase-frameworks as a dependency during the build step. firebase-frameworks has a peer dependency on firebase@^9.9.0.

https://github.com/FirebaseExtended/firebase-framework-tools/blob/0.10.4/package.json#L89

This conflicts with projects wanting to use the newly-released firebase@^10.0.0.

  • firebase-frameworks' peerDependencies should be updated to accept either firebase@^9.9.0 or firebase@^10.0.0 (assuming there's no breaking changes relevant to that package)
  • firebase-tools' hard-coded version of firebase-frameworks should be bumped to match

(firebase-frameworks' README says to submit bug reports here.)

[REQUIRED] Environment info

firebase-tools: 12.4.3

Platform: NixOS 23.11 (Tapir)

[REQUIRED] Test case

./firebase.json

{
  "hosting": {
    "source": "./hosting"
  }
}

./hosting/package.json

{
  "name": "hosting",
  "main": "./index.js",
  "directories": {
    "serve": "./public"
  },
  "dependencies": {
    "firebase": "^10.0.0",
    "express": "latest"
  }
}

./hosting/index.js

module.exports = (req, res) => {
    res.end();
};

[REQUIRED] Steps to reproduce

$ firebase deploy --only hosting

[REQUIRED] Expected behavior

The deploy should complete successfully.

[REQUIRED] Actual behavior

npm output from `firebase deploy` hidden, click to expand
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: firebase-frameworks@0.10.5
npm ERR! Found: firebase@10.0.0
npm ERR! node_modules/firebase
npm ERR!   firebase@"^10.0.0" from the root project
npm ERR!   firebase@"^10.0.0" from hosting@undefined
npm ERR!   node_modules/hosting
npm ERR!     hosting@"file:package.tgz" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional firebase@"^9.9.0" from firebase-frameworks@0.10.5
npm ERR! node_modules/firebase-frameworks
npm ERR!   firebase-frameworks@"^0.10.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: firebase@9.23.0
npm ERR! node_modules/firebase
npm ERR!   peerOptional firebase@"^9.9.0" from firebase-frameworks@0.10.5
npm ERR!   node_modules/firebase-frameworks
npm ERR!     firebase-frameworks@"^0.10.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions