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

282
Views
How can I remove this error when I deploy my React App?

Currently I have a functioning React app that I am able to run on localhost:3000. My current deployment process is as follows: I ran npm run build, and uploaded that file to my shared hosting provider.

I then added a .htaccess file with

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /index.html [L]
</IfModule>

Then I added "homepage": ".", in the package.json. (I even tried to add the "homepage": "http://websiteexample.com", instead of the . ).

From another post I seen, I even removed the forward slashes in my index.html.

None of this seems to work and gives me a blank page with the following error in the console: DevTools failed to load source map: Could not parse content for https://website.com/static/js/main.f532f71f.js.map: Unexpected token < in JSON at position 0

Question: How can I deploy it? Is there something I am missing?

UPDATE: I just deployed another react app, it seems as though this process works fine, but the issue is coming from one of my files... just need to figure out which one

UPDATE 2: I found the file... the error that I am getting now is: Uncaught TypeError: (0 , kn.forwardRef) is not a function What is this? Will update again soon.

UPDATE 3: I have a modal that takes props, which is making all these issues. BUT why does it fail to render once deployed, but works on localhost? Be back soon with more answers.

Final Update: The error was coming from the following line"

{ props.accordion1_1 ?  <Accordion></Accordion> : <Typogrpahy></Typography>}

The accordion comes from React Material Ui. So I decided to add a useEffect to watch for the props.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The error was coming from the following line:

{ props.accordion1_1 ?  <Accordion></Accordion> : <Typogrpahy></Typography>}

The accordion comes from React Material Ui. So I decided to add a useEffect to watch for the props.

about 4 years ago · Juan Pablo Isaza 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!