Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

459
Views
Webpack < 5 Issue when using firebase admin

When i want to use the firebase admin SDK using the following code

import * as admin from 'firebase-admin';
var serviceAccount = require("../services/serviceAccountKey.json");
admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: "https://voter-60a9f-default-rtdb.europe-west1.firebasedatabase.app"
});

I get this error

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
        - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "util": false }

This is just one of many. I also have this:

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
        - install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "path": false }

and so on....

I tried reinstalling the Node modules but no luck. I also dont understand where i should add that fallback they suggest. And if i would find it, do i need to add this for all the node modules?

Thanks!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I faced this same error what u can do is go to node_modules/react-scripts/config/webpack-config.js and make these changes

resolve: {
  modules: ...,
  extensions: ...,
  alias: {...}, fallback: {
    "fs": false,
    "tls": false,
    "net": false,
    "path": false,
    "zlib": false,
    "http": false,
    "https": false,
    "stream": false,
    "crypto": false,
    "crypto-browserify": false,
    "url": require.resolve("url"),
    "os": false,
    "os-browserify": false,
    "querystring": false,
    "buffer": false,
    "constants": false,
    "child_process": false
  },
  plugins: [...]
},
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!