Skip to content

ionic with angular universal SSR error #14538

@Jimmysh

Description

@Jimmysh

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

cli packages: (/usr/local/share/.config/yarn/global/node_modules)

   @ionic/cli-utils  : 2.0.0-rc.6
   ionic (Ionic CLI) : 4.0.0-rc.6

System:

   NodeJS : v9.11.1
   npm    : 5.6.0
   OS     : macOS High Sierra

Describe the Bug

Node Express server listening on http://localhost:4000
ERROR TypeError: Cannot read property 'parentNode' of undefined
    at HTMLHeadElement._ensureInsertValid (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:84448:17)
    at HTMLHeadElement.insertBefore (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:84573:12)
    at M (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:132888:17035)
    at defineCustomElements (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:132763:77)
    at Array.<anonymous> (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:132728:85)
    at ApplicationInitStatus.runInitializers (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:7067:50)
    at /Users/jimmy/Desktop/universal-starter-master/dist/server.js:8641:28
    at _callAndReportToErrorHandler (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:8784:22)
    at /Users/jimmy/Desktop/universal-starter-master/dist/server.js:8639:20
    at ZoneDelegate.invoke (/Users/jimmy/Desktop/universal-starter-master/dist/server.js:558:26)

Steps to Reproduce
Steps to reproduce the behavior:

Related Code
https://github.com/Jimmysh/ionic-angular-ssr-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions