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

Deployment via CLI fails when adding package "@genkit-ai/firebase": "^0.9.12", #1523

Open
AttilaJF opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working tooling

Comments

@AttilaJF
Copy link

Describe the bug
When trying to deploy project using CLI command firebase deploy.
the following error report emerges:

Build failed with status: FAILURE and message: npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @genkit-ai/firebase@0.9.12
npm error Found: firebase-admin@11.11.1
npm error node_modules/firebase-admin
npm error firebase-admin@"^11.11.1" from the root project
npm error peer firebase-admin@"^11.0.1 || ^12.0.0" from firebase-frameworks@0.11.6
npm error node_modules/firebase-frameworks
npm error firebase-frameworks@"^0.11.0" from the root project
npm error 1 more (firebase-functions)
npm error
npm error Could not resolve dependency:
npm error peer firebase-admin@">=12.2" from @genkit-ai/firebase@0.9.12
npm error node_modules/@genkit-ai/firebase
npm error @genkit-ai/firebase@"^0.9.12" from the root project
npm error
npm error Conflicting peer dependency: firebase-admin@13.0.1
npm error node_modules/firebase-admin
npm error peer firebase-admin@">=12.2" from @genkit-ai/firebase@0.9.12
npm error node_modules/@genkit-ai/firebase
npm error @genkit-ai/firebase@"^0.9.12" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

The dependency issue also occurs when trying different versions.
To Reproduce
Steps to reproduce the behavior:

  1. start nextjs project with package.json below:
    {
    "private": true,
    "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start"
    },
    "dependencies": {
    "@genkit-ai/dev-local-vectorstore": "^0.9.12",
    "@genkit-ai/googleai": "^0.9.12",
    "@genkit-ai/vertexai": "^0.9.12",
    "classnames": "^2.5.1",
    "date-fns": "^3.6.0",
    "genkit": "^0.9.12",
    "gray-matter": "^4.0.3",
    "llm-chunk": "^0.0.1",
    "next": "15.0.2",
    "pdf-parse": "^1.1.1",
    "react": "19.0.0-rc-02c0e824-20241028",
    "react-dom": "19.0.0-rc-02c0e824-20241028",
    "remark": "^15.0.1",
    "remark-html": "^16.0.1"
    },
    "devDependencies": {
    "@types/node": "^20.14.8",
    "@types/pdf-parse": "^1.1.4",
    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
    "autoprefixer": "^10.4.19",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.4",
    "typescript": "^5.5.2"
    }
    }

  2. initialize firebase project and use command firebase deploy

  3. The project deploys without any issues

  4. install package: "@genkit-ai/firebase": "^0.9.12",

  5. deploy project with firebase deploy

  6. The above error report is printed

Expected behavior
The project should deploy without dependency issues. Locally running the project does not shows issues.

Desktop (please complete the following information):

  • Device: [MacBook Pro
  • OS: [macOS 14.4.1 (23E224)]
  • Browser [Chrome, Firefox, Safari,]

Additional context
A RAG project was built and runs fine locally. Deployment is not possible using "@genkit-ai/firebase" for retrieval.
import { defineFirestoreRetriever } from "@genkit-ai/firebase";
// export const faqRetriever = defineFirestoreRetriever(ai, {
// name: "faqRetriever",
// firestore: getFirestore(app),
// collection: "studentFaq",
// contentField: "text",
// vectorField: "embedding",
// embedder: textEmbedding004, // Import from '@genkit-ai/googleai' or '@genkit-ai/vertexai'
// distanceMeasure: "COSINE", // "EUCLIDEAN", "DOT_PRODUCT", or "COSINE" (default)
// });

@AttilaJF AttilaJF added bug Something isn't working tooling labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tooling
1 participant