Giter VIP home page Giter VIP logo

Comments (3)

ysus avatar ysus commented on May 30, 2024

mixpanel/mixpanel-js#119

from ng-universal-demo.

FrozenPandaz avatar FrozenPandaz commented on May 30, 2024

Hi the document does not exist on the server as it does on the browser. This library should probably not be on the server. If the functionality is desired on the server either find a node version of the library or substitute it with your own.

from ng-universal-demo.

deepakzoto avatar deepakzoto commented on May 30, 2024

I removed mixpanel from my project. But I am also using angular 2 material and getting this error now:

GET: /: 308.202ms ERROR { ReferenceError: document is not defined at DefaultDomRenderer2.selectRootElement (D:\GitWork\web-ui\dist\server.js:37319:72) at createElement (D:\GitWork\web-ui\dist\server.js:10091:23) at createViewNodes (D:\GitWork\web-ui\dist\server.js:12769:44) at createRootView (D:\GitWork\web-ui\dist\server.js:12716:5) at Object.createProdRootView [as createRootView] (D:\GitWork\web-ui\dist\server.js:13377:12) at ComponentFactory_.create (D:\GitWork\web-ui\dist\server.js:10637:46) at ComponentFactoryBoundToModule.create (D:\GitWork\web-ui\dist\server.js:4173:29) at ApplicationRef_.bootstrap (D:\GitWork\web-ui\dist\server.js:5757:57) at D:\GitWork\web-ui\dist\server.js:5546:79 at Array.forEach (native) at PlatformRef_._moduleDoBootstrap (D:\GitWork\web-ui\dist\server.js:5546:42) at D:\GitWork\web-ui\dist\server.js:5508:27 at ZoneDelegate.invoke (D:\GitWork\web-ui\dist\server.js:118248:26) at Object.onInvoke (D:\GitWork\web-ui\dist\server.js:4874:37) at ZoneDelegate.invoke (D:\GitWork\web-ui\dist\server.js:118247:32) at Zone.run (D:\GitWork\web-ui\dist\server.js:117998:43) at D:\GitWork\web-ui\dist\server.js:118675:57 at ZoneDelegate.invokeTask (D:\GitWork\web-ui\dist\server.js:118281:31) at Object.onInvokeTask (D:\GitWork\web-ui\dist\server.js:4865:37) at ZoneDelegate.invokeTask (D:\GitWork\web-ui\dist\server.js:118280:36) at Zone.runTask (D:\GitWork\web-ui\dist\server.js:118048:47) at drainMicroTaskQueue (D:\GitWork\web-ui\dist\server.js:118441:35) at ZoneTask.invoke (D:\GitWork\web-ui\dist\server.js:118347:25) at data.args.(anonymous function) (D:\GitWork\web-ui\dist\server.js:119131:25) at FSReqWrap.oncomplete (fs.js:114:15) __zone_symbol__currentTask: ZoneTask { _zone: Zone { _properties: [Object], _parent: [Object], _name: 'angular', _zoneDelegate: [Object] }, runCount: 0, _zoneDelegates: null, _state: 'notScheduled', type: 'microTask', source: 'Promise.then', data: undefined, scheduleFn: undefined, cancelFn: null, callback: [Function], invoke: [Function] } }.
I know material is not compatible with universal. Can we use angular-ssr
[https://www.npmjs.com/package/angular-ssr] to solve this problem ?

from ng-universal-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.