storefront-angular-starter
storefront-angular-starter copied to clipboard
serve ssr problem
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)
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:
- Open file src\environments\environment.prod.ts -> copy the content from the environment.ts to this file (or change according to your production environment)
- 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.