Skip to content

[V5:19330] Deployment on different servers not working #22284

Closed
@hanpaine

Description

Dupe of #19330 for tracking V5 fix

Required System information
Launched In: 166 ms
Environment: development
OS: darwin-arm64
Strapi Version: 4.19.0
Node/Yarn Version: npm/10.2.3 node/v20.10.0 darwin arm64 workspaces/false
Edition: Community
Database: sqlite

Describe the bug
I'm following the deployment guide for different servers (I want to deploy the admin panel - react app - to Netlify and the server to a droplet or similar). Still, the generated index.html file contains invalid paths to the generated js files.

Steps to reproduce the behavior
Create a Strapi example project using the quick start guide - https://docs.strapi.io/dev-docs/quick-start
Configure the server.js and admin.js files as described in the different server configuration guide - https://docs.strapi.io/dev-docs/admin-panel-customization#different-servers
Run NODE_ENV=production npm run build
The generated paths to the js files contain an extra slash, generating 404 errors:
src="//runtime~main.35ff75f1.js"
src="//main.19186bea.js"

Expected behavior
Create the index.html with the correct paths with only one slash to access the admin site using the http://yourfrontend.com/ URL. I think in this context the proxy recommendation not apply because this is a front-end app with the index.html file and js files, must work with any static hosting provider.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    flag: EEIssues correlates to internal EE ticketissue: bugIssue reporting a bugseverity: highIf it breaks the basic use of the productsource: core:strapiSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersversion: 5

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions