Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

222
Visualizações
Node.js : Can't resolve 'fs' in in E:\Code\Internet Radio

As a summer project, I am creating an internet radio application, and settled on using Spotify's web playback API. I was going through their recommended guide of starting a react js app (of which can be found HERE), until I got to authorizing the user through a web call through the Router module:

router.get('/auth/login', (req, res) => {...}

These used to be included in webpack version 1-4, but no longer in v5. I was able to remedy this by individually installing all of them, except for fs. From what I have found, fs is a node module that can not be accessed in a web browser, so the react js application refuses to recognize it and gives me this error:

ERROR in ./node_modules/mime/mime.js 3:9-22'
Module not found: Error: Can't resolve 'fs' in 'E:\Code\Internet Radio\spotify\spotify-web-player\node_modules\mime

MANY other threads recommend adding this snippet to the resolve.fallback in webpack.config.js:

"fs": false

but seeing as it is required for the provided SDK and react js application to function, I am stuck.

I have looked at alternatives such as fs-browserify, like-fs, filer, and fs-web, but they either lead to more errors worthy of redesigning how fs was implemented originally, or cause my react js app to load a web page with almost empty HTML, and stating

You need to enable Javascript to run this app

Is there maybe a way to revert back to a previous webpack version, or is there something I am completely failing to find in the sea of about 30 open tabs looking for a solution on my own

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda