• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

260
Views
pushing vite reactjs build on GitHub pages gives 404 on build files

i have a reactjs website using vitejs when i compile it using npm run build it generates the compiled site inside dist folder, when i publish the content to this folder i encounter a

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

and serval

GET https://brijrajparmar27.github.io/assets/index.d12487b2.js net::ERR_ABORTED 404

here what i find odd is that if you check the url in above error its trying to find the .js file inside brijrajparmar27.github.io/assets/ shouldn't it be inside https://brijrajparmar27.github.io/[Repo-Name]/assets?

it still works on my localhost though somehow.

after looking at this i added the [Repo-name]/ manually at the beginning of link tags of compiled index.html file in dist folder, on hosting that i got

GET https://brijrajparmar27.github.io/Atmosphere/Atmosphere/assets/vendor.95b2f1d7.js net::ERR_ABORTED 404

repo name is listed twice.

almost 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It seems that vite build defaults base to single "/" https://vitejs.dev/config/#base

I've fixed issue with incorrect request URL by changing build script in package.json to:

"build": "vite build --base=./"

almost 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error