Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

209
Vistas
How to solve the "module not found error"? webpack 5 no longer includes polyfills for node.js core modules by default

I am working on a react application where several peices of text can be shared on twitter using a button. This button would utilise the twitter api v2 so i installed the twitter-api-v2 npm package and made an object as shown here:

const { TwitterApi } = require("twitter-api-v2");

But I am getting the same errors as seen in this question: How to Polyfill node core modules in webpack 5 (I have also tried other twitter api clients' npm packages and they all result in such errors or more even) Except mine are for the packages: crypto, https, zlib and the final 2 errors are of "can't resolve fs"

I have tried the method of creating a webpack.config.js in the root of the project and adding the following code and installing the packages (as the error messages suggest) but it did not help. My webpack.config.js:

module.exports = {
  resolve: {
    fallback: {
      crypto: require.resolve("crypto-browserify"),
      https: require.resolve("https-browserify"),
      zlib: require.resolve("browserify-zlib"),
      fs: false,
    },
  },
};

Are there other solutions i can follow or is there another way for me to tweet a thread of some pieces of texts? Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda