Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serve ssr problem #13

Open
sirramin opened this issue May 12, 2020 · 1 comment
Open

serve ssr problem #13

sirramin opened this issue May 12, 2020 · 1 comment

Comments

@sirramin
Copy link

After building ssr version with "build:ssr" script I tried to run it with "serve:ssr" script
But it contains errors blow

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'runtime.64107a3829618e063f9a.js'
Error: Cannot match any routes. URL Segment: 'runtime.64107a3829618e063f9a.js' at ApplyRedirects.noMatchError (\storefront\dist\server\main.js:1:4180130)

@phongnguyen6691
Copy link

Hi @sirramin

Vendure storefront supposes your base path is "https://yourhost.com/storefront", you either need to setup a redirect rule or override the base path as below:

  1. Open file src\environments\environment.prod.ts -> copy the content from the environment.ts to this file (or change according to your production environment)
  2. Remove the "/storefront" in all these files angular.json, src\app\app.module.ts, src\manifest.json

Delete the dust folder and build again then re-test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants