Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48977

Ionic 4 ssr issue

$
0
0

error : ERROR TypeError: Cannot redefine property: constructor
** at Function.defineProperty ()**

i’m trying to use angular universal ssr in my app .
i got an error with self is not defined
then tried to use domino library like that :

  const domino = require('domino');
  const fs = require('fs');
  const path = require('path');
  const template = fs.readFileSync(path.join(distFolder, '.', '.', 'index.html')).toString();
  const win = domino.createWindow(template);
  global['window'] = win;
  global['self'] = win;

then this error error : ERROR TypeError: Cannot redefine property: constructor
** at Function.defineProperty ()**

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>