Giter VIP home page Giter VIP logo

Comments (9)

ingljoOpt avatar ingljoOpt commented on September 13, 2024 2

I get the same error.
Isn't it because of the peerDependencies in the nuxt-vuefire package?

 "peerDependencies": {
    "@firebase/app-types": ">=0.8.1",
    "firebase": "^9.0.0 || ^10.0.0",
    "firebase-admin": "^11.3.0",
    "firebase-functions": "^4.1.0",
    "vuefire": ">=3.1.23"
  },

This is npm install error message when using firebase-admin v.12.11.1

npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/firebase-admin
npm error   dev firebase-admin@"^12.1.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional firebase-admin@"^11.3.0" from [email protected]
npm error node_modules/nuxt-vuefire
npm error   dev nuxt-vuefire@"^1.0.2" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/firebase-admin
npm error   peerOptional firebase-admin@"^11.3.0" from [email protected]
npm error   node_modules/nuxt-vuefire
npm error     dev nuxt-vuefire@"^1.0.2" 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.

Also included is the audit report for why it is urgent to update the firebase-admin package to 12.11.1:

# npm audit report

protobufjs  7.0.0 - 7.2.4
Severity: critical
protobufjs Prototype Pollution vulnerability - https://github.com/advisories/GHSA-h755-8qp9-cq85
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/google-gax/node_modules/protobufjs
  google-gax  2.2.1-pre - 2.2.1-pre.2 || 2.28.2-alpha.1 - 2.28.4-alpha.1 || 3.1.4 - 4.0.3
  Depends on vulnerable versions of protobufjs
  node_modules/google-gax
    @google-cloud/firestore  6.1.0-pre.0 - 6.8.0
    Depends on vulnerable versions of google-gax
    node_modules/@google-cloud/firestore
      firebase-admin  11.1.0 - 11.11.1
      Depends on vulnerable versions of @google-cloud/firestore
      node_modules/firebase-admin
        nuxt-vuefire  >=0.0.2
        Depends on vulnerable versions of firebase-admin
        node_modules/nuxt-vuefire

from vuefire.

posva avatar posva commented on September 13, 2024 1

Install with pnpm. There is a pnpm-lock πŸ˜„

from vuefire.

ingljoOpt avatar ingljoOpt commented on September 13, 2024 1

@BenJackGill This issue should probably be reopened?

from vuefire.

posva avatar posva commented on September 13, 2024 1

This was about something else in a different repo.

the version mismatch requires updating the version of Firebase admin and it’s already planned and tracked I just haven’t had the time lately for it

from vuefire.

BenJackGill avatar BenJackGill commented on September 13, 2024

Ok I'll finally give pnpm a try πŸ˜„ Does this mean VueFire is not package manager agnostic? I thought plain npm was supported.

from vuefire.

posva avatar posva commented on September 13, 2024

In your project use what you want. But note install errors are not coming from here, just the setup

from vuefire.

BenJackGill avatar BenJackGill commented on September 13, 2024

I am not the owner of the repo and I did not close the issue. Reopening the issue would be up to @posva.

I also believe it to be a problem and was confused by his earlier response about it being a setup issue, but since this is not my repo I assumed he knew best. Maybe he will take another look.

from vuefire.

davidstackio avatar davidstackio commented on September 13, 2024

Something is broken. I'm trying to follow the instructions here:
https://vuefire.vuejs.org/nuxt/getting-started.html

But npx nuxi@latest module add vuefire doesn't work. I get the error below.

I tried a workaround using the old versions of the modules: npm i --save firebase-admin@11 firebase-functions@4, but I kept getting this error after running npm run dev:

 ERROR  Pre-transform error: Failed to resolve import "@firebase/auth" from "node_modules/firebase/auth/dist/esm/index.esm.js?v=b1737bf2". Does the file exist? (x4) 

As @ingljoOpt said, there are critical security issues that are fixed in the latest version of firebase-admin, so getting this addressed quickly seems prudent.

Logs

β„Ή Installing nuxt-vuefire@latest development dependency                                                                                                                                                                                                                                                   7:08:43 PM
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/firebase-functions
npm error   firebase-functions@"^5.0.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional firebase-functions@"^4.1.0" from [email protected]
npm error node_modules/nuxt-vuefire
npm error   dev nuxt-vuefire@"1.0.2" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/firebase-functions
npm error   peerOptional firebase-functions@"^4.1.0" from [email protected]
npm error   node_modules/nuxt-vuefire
npm error     dev nuxt-vuefire@"1.0.2" 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.
npm error
npm error
npm error For a full report see:
npm error C:\Users\David\AppData\Local\npm-cache\_logs\2024-06-25T23_08_44_465Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\David\AppData\Local\npm-cache\_logs\2024-06-25T23_08_44_465Z-debug-0.log

 ERROR  Command failed with exit code 1: npm install -D nuxt-vuefire@latest                                                                                                                                                                                                                                7:08:53 PM  

  at makeError (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/chunks/index3.mjs:1272:11)
  at handlePromise (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/chunks/index3.mjs:2510:26)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async executeCommand (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.0f575f79.mjs:42:3)
  at async addDependency (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.0f575f79.mjs:197:3)
  at async Object.setup (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/chunks/add2.mjs:26228:19)
  at async runCommand$1 (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1620:5)
  at async runCommand$1 (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)
  at async runCommand$1 (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)
  at async runMain$1 (/C:/Users/David/Documents/GitHub/elora/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1777:7)


βœ” Install failed for nuxt-vuefire@latest. Do you want to continue adding the module to nuxt.config?

Nuxi Info

Nuxt project info:                                                                                                                                                                                                                                                                                         8:16:02 PM

------------------------------
- Operating System: Windows_NT
- Node Version:     v20.11.1
- Nuxt Version:     3.12.2
- CLI Version:      3.12.0
- Nitro Version:    2.9.6
- Package Manager:  [email protected]
- Builder:          -
- User Config:      extends, modules, sanity, vuefire, site
- Runtime Modules:  [email protected]
- Build Modules:    -
------------------------------

from vuefire.

davidstackio avatar davidstackio commented on September 13, 2024

If anyone comes across the error I was having I just installed manually with npm i @firebase/auth and that seems to have fixed it.

ERROR  Pre-transform error: Failed to resolve import "@firebase/auth" from "node_modules/firebase/auth/dist/esm/index.esm.js?v=b1737bf2". Does the file exist? (x4) 

from vuefire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.