Comments (3)
from ng-universal-demo.
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.
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)
- Server render global styles HOT 7
- how to build the file /ngfactory/app/server-app.module.ngfactory HOT 2
- how to add images to pages? HOT 3
- Adding mongoose HOT 3
- aot with universal
- Router resolve with the TransferHttp module
- onBootstrap HOT 1
- How can you access location/url information on the server angular app HOT 3
- What is the purpose of the TransferHttpModule HOT 8
- Error compiling Scss with npm run build:aot HOT 1
- Problem with assets folder HOT 2
- The server not start HOT 1
- Angular Express Engine service error
- Can't get SASS to work. HOT 1
- Appengine deploy failing HOT 1
- Setting State
- HttpClient HOT 1
- How to make HTTP calls on the server-side inside a lazy loaded module
- security issue with server bundle output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-universal-demo.