Coder Social home page Coder Social logo

Comments (15)

ahaverty avatar ahaverty commented on June 12, 2024 6

We're seeing the same issue. We managed to get

"firebase-admin": "4.2.1",
"firebase-functions": "0.5.9",

to work though.

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024 2

Fixed by #66

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024 2

Can you try running this in your functions folder:

npm install firebase-functions@latest --save
npm install [email protected] --save

If you still get errors, can you copy and paste here?

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024 2

This is not a bug, it's just quirks with how npm install works. Running npm i --save firebase-admin inside a directory that already has a package.json which has a firebase-admin field will install the version that is indicated in the package.json, not the latest version in npm.

Try running npm i --save [email protected] --save --save-exact, this will put "firebase-admin": "5.1.0" in your package.json.

from firebase-functions.

KevinMind avatar KevinMind commented on June 12, 2024 2

Tried with admin: 4.2.1 and functions: 0.5.9 and got the same error.

./node_modules/firebase-admin/node_modules/isemail/lib/isemail.js
Module not found: Can't resolve 'dns' in '/Users/devmode/Documents/projects/google-crm/node_modules/firebase-admin/node_modules/isemail/lib'

Error fires when I require('firebase-admin')

Anyone figured anything out?

from firebase-functions.

cristiano-belloni avatar cristiano-belloni commented on June 12, 2024 1

This is not fixed.
I get it with [email protected], which says UNMET PEER DEPENDENCY firebase-admin@~5.1.0.

Then:

npm i --save firebase-admin installs some 4.2.1, which is wrong.
npm i --save [email protected] installs 5.1.0, which is right but now obviously I have "firebase-admin": "^5.1.0" in my package.json :(

I don't know why npm i --save firebase-admin installs a 4.x though, since npm reports that the latest version is 5.2.1 :/

Can you please reopen?

from firebase-functions.

morgler avatar morgler commented on June 12, 2024

Thanks, I will try that combination of versions.

from firebase-functions.

morgler avatar morgler commented on June 12, 2024

I did not get the 0.5.9 combination of @ahaverty to work – it shows the same error for me :(.

Also using the latest version today still gave me 0.6.0 and demanded firebase-admin 5.0.1.

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

firebase/firebase-tools#434 will also update the default "firebase init" template, which will hopefully alleviate some of the npm pain.

from firebase-functions.

xor007 avatar xor007 commented on June 12, 2024

isn't the point of using package managers and package manifests with exact versions to avoid manually wrangling with versions? Or is this not possible with npm packages? Note: I am completely new to npm/node

from firebase-functions.

esparkman avatar esparkman commented on June 12, 2024

I'm seeing dependency issues as well.
firebase-admin: 5.2.1

➜  customer-manager (master) ✗ yarn add firebase-admin                                                    .../customer-manager
yarn add v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
├─ @google-cloud/[email protected]
└─ [email protected]
Done in 4.74s.

➜  customer-manager (master) ✗ yarn start                                                                 .../customer-manager

yarn start v0.27.5
$ node build/dev-server.js
> Starting dev server...

 ERROR  Failed to compile with 22 errors                                                                            10:37:27 PM

These dependencies were not found:

* fs in ./~/firebase-admin/lib/auth/credential.js, ./~/@google-cloud/storage/src/bucket.js and 10 others
* net in ./~/faye-websocket/lib/faye/websocket/client.js, ./~/forever-agent/index.js and 3 others
* tls in ./~/faye-websocket/lib/faye/websocket/client.js, ./~/forever-agent/index.js and 1 other
* child_process in ./~/google-auth-library/lib/auth/googleauth.js
* dns in ./~/isemail/lib/isemail.js

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

@esparkman can you file this as an issue on https://github.com/firebase/firebase-admin-node?

from firebase-functions.

esparkman avatar esparkman commented on June 12, 2024

@laurenzlong sure thing. Any additional information needed?

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

Can you try to repro this in a plain-old clean directory? (I'm pretty sure you'll be able to, since this seems to be a firebase-admin issue that's independent of Functions). Then make sure you follow the issues template for firebase-admin. Thanks!

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

@KevinMind Please only indicate issues with the latest versions of each of the modules. Your versions are outdated. And as indicated above, if you still experience issues after using the latest versions, please file the issue on firebase-admin-node, not here.

from firebase-functions.

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.