question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting HttpInterceptingHandler is not a constructor error while universal rendering

See original GitHub issue

I’m trying to setup the server side rendering of my angular app, I have followed the instruction from here:

https://github.com/angular/angular-cli/wiki/stories-universal-rendering

Every command runs successfully, but after starting node server, when I try to visit the url, It throws the following error:

TypeError: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__.ɵHttpInterceptingHandler is not a constructor
    at zoneWrappedInterceptingHandler (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:4040:23)
    at _callFactory (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:14256:20)
    at _createProviderInstance$1 (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:14210:26)
    at initNgModule (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:14143:32)
    at new NgModuleRef_ (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:14872:9)
    at Object.createNgModuleRef (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:14861:12)
    at NgModuleFactory_.create (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:17394:25)
    at /Stuff/Development/Angular/angular-tuts/universal/dist/server.js:9693:43
    at ZoneDelegate.invoke (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:515:26)
    at Object.onInvoke (/Stuff/Development/Angular/angular-tuts/universal/dist/server.js:9035:33)

Can anybody please help me with this?

Stackoverflow question reference: https://stackoverflow.com/questions/50781778/httpinterceptinghandler-is-not-a-constructor-while-universal-rendering-angularjs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
twoheadedcommented, Jun 11, 2018

Looks like it’s a conflict between platform-server@6.0.4 and angular/common@6.0.3. Was fixed in https://github.com/angular/angular/commit/60aa943e2dd4654600c0e53e51b8d7a1ac3730da.

Update your angular dependencies:

ng update @angular/core

It helped me

0reactions
angular-automatic-lock-bot[bot]commented, Sep 4, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpInterceptingHandler is not a constructor while universal ...
HttpInterceptingHandler is not a constructor while universal rendering ... I'm trying to setup the server side rendering of my angular app ...
Read more >
Angular Universal: real app problems - InDepth.Dev
The project makes server-side rendering possible in Angular. ... But when we run this code on the server, we will get an error...
Read more >
[Solved]-Proper design for repeated timed actions-angular.js
Create message queue and run worker to check for task to run. import { BehaviorSubject, timer, from} from 'rxjs'; import { withLatestFrom, map,...
Read more >
The biggest Angular Universal gotchas, and how to avoid them
Angular Universal is a technology which allows you to create Angular apps that render both in the browser and on a Node.js server....
Read more >
Angular SSR: The Browser Is Not The Server - Fullstack.io
In this article, we're talking about blazing fast performance with Angular Universal with server-side-rendering (SSR).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found