System Information
- Strapi Version: 4.23.0
- Operating System: Ubuntu 22.04.2
- Database: default
- Node Version: 18.17.1
- NPM Version:
- Yarn Version:
Hey, I tried to deploy Strapi on Cloudflare Pages, but it’s not working. I did not change anything from the default quickstart Strapi installation, simply pushed to Github and deployed on Pages.
Here are the build settings:
Build command: npm run build
Build output directory: /build
When I try to access the admin It returns:
Refused to execute script from 'https://strapi-test.pages.dev/admin/runtime~main.9fa206e4.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'https://strapi-test.pages.dev/admin/main.1eb018ae.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
I can see that in the generated index.html scripts are coming as:
<script defer="defer" src="/admin/main.16c00dfe.js"...
If I override them in devtools to be:
<script defer="defer" src="main.16c00dfe.js"...
Everything works fine then, but I cannot make it working with the deployment, without manually overriding the content.