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

221
Views
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
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!