I have an existing project using angular 6
. I have implemented angular universal
on my existing project.
Now when I run build:ssr
and run node web/server.js
. it gives me: Node server listening on http://localhost:4000
but when I open a browser and type http://localhost:4000
in that browser I receive this error.
ERROR TypeError: Cannot read property 'pipe' of undefined
at AuthInterceptor.addToken (/home/razmjo/workstation/jobsaf-website/web/server.js:362410:13)
at AuthInterceptor.request (/home/razmjo/workstation/jobsaf-website/web/server.js:362384:21)
at AuthInterceptor.processIntercept (/home/razmjo/workstation/jobsaf-website/web/server.js:362377:21)
at AuthInterceptor.intercept (/home/razmjo/workstation/jobsaf-website/web/server.js:362372:21)
.
.
.
.
at ZoneTask.invokeTask (/home/razmjo/workstation/jobsaf-website/web/server.js:647:21)
at Server.ZoneTask.invoke (/home/razmjo/workstation/jobsaf-website/web/server.js:632:48)
at Server.emit (events.js:182:13)
at parserOnIncoming (_http_server.js:658:12)
Note: I have used ngx-auth package for my authentication purpose, and this error come from that package.
Thanks in advance.