As shown below:
After I enabled SSR locally, the server returned the rendered source code and each CX-Page-layout tag was empty:
But on the server used to do SSR testing, the complete source code is returned:
The reason:
Additionally, it looks like you might have an invalid certificate on the back-end, which causes the angular SSR render to pass (therefore you see the regular non-CMS angular components being rendered), But you won’t see Spartacus’ CMS components being raster. To go around this in development, You can first install “cross-env” package, And then run cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 Node dist/storefrontapp-server/main.js After doing all this, you should be able to see the more sensible response.
Solution:
cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 node dist/storefrontapp-server/main.js
More of Jerry’s original articles can be found in “Wang Zixi” :