admin管理员组

文章数量:1277317

Im trying to host my project on github pages, project is working good in localhost but on gh pages I got blank page and an error like this on console:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

Im trying to host my project on github pages, project is working good in localhost but on gh pages I got blank page and an error like this on console:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

Share Improve this question edited Jul 12, 2022 at 6:59 vimuth 5,67248 gold badges93 silver badges124 bronze badges asked Jul 12, 2022 at 6:58 Kevin TanuwijayaKevin Tanuwijaya 1211 gold badge1 silver badge6 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

The problem is not the error message, it's because i'm using react router, so i need to define the routes according to github repo name

Before:

<Router>
  <Routes>
    <Route path="/" element={<Home />} />
  </Routes>
</Router>

After:

<Router>
  <Routes>
    <Route path="/desa" element={<Home />} />
  </Routes>
</Router>

I solved this is issue use the "exact" in routes

return <BrowserRouter>
<div className="App">
<Routes>
    <Route exact path="/" element={ <Home /> } />
    <Route exact path="startcreating" element={ <Start /> } />
    <Route exact path="aboutus" element={ <About /> } />
    {/* <Route path="signup" element={ <SignUpModel /> } /> */}
</Routes> 
</div>
</BrowserRouter>;

本文标签: