0

I'm just building a simple website and try to use github-pages. But somehow I got:

Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.

I'm not sure about that warning, and my website doesn't show anything.

Here if you want to see it: https://yoga1234.github.io/frontendmentor-challenges/

Septiana Yoga
  • 21
  • 1
  • 7

1 Answers1

1

I took a look at your code on GitHub. I think the problem is with your React router. GitHub pages are deployed in a subdirectory by default. You need to adjust the basepath (homepage) in package.json accordingly. I change the path in my CI script, because i had the same problem a year ago:

 - name: Adjust basename 
   uses: deef0000dragon1/json-edit-action/@v1
   env:
    KEY: homepage
    VALUE: /frontendmentor-challenges/
    FILE: package.json

Full example: https://github.com/foorschtbar/spa-crud-frontend/commit/a125d28d4c9f452c73aa6cae8a56cad3f3e6b262

foorschtbar
  • 83
  • 1
  • 7
  • So, I just change the "/" to homepage URL "frontend-challenge". Is that ok? so my website doesn't have "/" url ? – Septiana Yoga Mar 20 '22 at 13:27
  • It depends on your deployment. When your page run direct under "/" thats fine. If you deploy it under "/subdir" you must change it. Maybe there a other ways to fix this in router, but i dont know it. See https://stackoverflow.com/questions/46235798/relative-path-in-index-html-after-build – foorschtbar Mar 20 '22 at 13:33