skip to Main Content

I am seeking to set up flutter on the web with firebase. I have followed the steps on the firebase website

I have installed Firebase CLI and then I run

  1. firebase login
  2. Then I run firebase init hosting and select "Use an existing project" but
    I get this error:
(node:41671) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.

screen shot of options

ERROR after selection of existing project

screen shot after i select option (existing project)

I have removed Node.js and reinstalled (using homebrew) hoping it would fix the error, but it remains.

Note I also get a warning after each prompt above, which I suspect could be related to my issue, but cannot resolve either:

(node:41671) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

2

Answers


  1. Chosen as BEST ANSWER

    Note sure what was causing the error, but I finally got working after removing node.js following steps from this post remove node.js

    Then reinstalling following these steps: install firebase with flutter


  2. Was able to remove the ‘DeprecationWarning’ error by changing my current Node.js version using NVM.

    Originally I was using Node version 22.3.0 (nvm current) but Firebase Cloud Functions documentation mentioned that FirebaseCLI fully supports Node v18 and v20 with only preview-level support of v22 (https://firebase.google.com/docs/functions/get-started?gen=2nd#set-up-your-environment-and-the-firebase-cli)

    (1) Used NVM to install latest Node version
    nvm install --lts

    (2) Used NVM to switch to latest Node version
    nvm use --lts

    (3) Confirmed Node was v20
    node --version

    (4) Re-authenticated my Firebase login using Google Oauth2
    firebase logout {google email} then firebase login to authenticate via web browser

    (5) Successfully initialized firestore within a current firebase project without any ‘DeprecationWarning’ errors
    firebase init firestore

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search