0

I have an App and I can not deploy to Firebase when I add this line to the code:

 <Switch>
      <Route path='/:name' component={Business} />
 </Switch>

The data is rendering perfectly if I see it on my editor online Stackblitz or localhost, but I cannot deploy just because of that.

Here is the standard App code:

import React from 'react';
import { Switch, Route } from 'react-router-dom';
import Business from './pages/business';

function App() {
  return (
    <Switch>
      <Route path='/:name' component={Business} />
    </Switch>
  );
}

export default App;

I can deploy if I change the Switch and Route part to for example:

   <div>  
      <h4>Hello World!</h4>
      <p>Start editing to see some magic happen :)</p>
   </div>

So I think must be an incompatibility with Firebase. Any Idea?

The Stackblitz panel stuck like the picture attached.enter image description here

[![enter image description here][2]][2]

Agustin Rodrigues
  • 63
  • 1
  • 2
  • 11

1 Answers1

0

Solve! avoid using Stackblitz for deploying,

Agustin Rodrigues
  • 63
  • 1
  • 2
  • 11