static injector error when serving universal-prod
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
Current behavior When I follow the documentation and run:
npm run build:universal-prod
npm run serve
and in the browser go to:
http://localhost:8000
I get the following error :
Express server listening on http://localhost:8000
TypeError: StaticInjectorError(AppServerModule)[InjectionToken Application Initializer -> InjectionToken DocumentToken]:
StaticInjectorError(Platform: core)[InjectionToken Application Initializer -> InjectionToken DocumentToken]:
Right-hand side of 'instanceof' is not an object
at insertElement (/Users/bobsingor/Github/universal-original/.server/server.js:1:1931338)
at insertHTMLElement (/Users/bobsingor/Github/universal-original/.server/server.js:1:1931060)
at before_head_mode (/Users/bobsingor/Github/universal-original/.server/server.js:1:1969190)
at HTMLParser.htmlparser.insertToken (/Users/bobsingor/Github/universal-original/.server/server.js:1:1930092)
at /Users/bobsingor/Github/universal-original/.server/server.js:1:1935200
at data_state (/Users/bobsingor/Github/universal-original/.server/server.js:1:1935238)
at scanChars (/Users/bobsingor/Github/universal-original/.server/server.js:1:1926850)
at Object.parse (/Users/bobsingor/Github/universal-original/.server/server.js:1:1925007)
at Object.exports.createDocument (/Users/bobsingor/Github/universal-original/.server/server.js:1:3724599)
at Object.exports.createWindow (/Users/bobsingor/Github/universal-original/.server/server.js:1:3724755)
TypeError: StaticInjectorError(AppServerModule)[InjectionToken Application Initializer -> InjectionToken DocumentToken]:
StaticInjectorError(Platform: core)[InjectionToken Application Initializer -> InjectionToken DocumentToken]:
Right-hand side of 'instanceof' is not an object
at insertElement (/Users/bobsingor/Github/universal-original/.server/server.js:1:1931338)
at insertHTMLElement (/Users/bobsingor/Github/universal-original/.server/server.js:1:1931060)
at before_head_mode (/Users/bobsingor/Github/universal-original/.server/server.js:1:1969190)
at HTMLParser.htmlparser.insertToken (/Users/bobsingor/Github/universal-original/.server/server.js:1:1930092)
at /Users/bobsingor/Github/universal-original/.server/server.js:1:1935200
at data_state (/Users/bobsingor/Github/universal-original/.server/server.js:1:1935238)
at scanChars (/Users/bobsingor/Github/universal-original/.server/server.js:1:1926850)
at Object.parse (/Users/bobsingor/Github/universal-original/.server/server.js:1:1925007)
at Object.exports.createDocument (/Users/bobsingor/Github/universal-original/.server/server.js:1:3724599)
at Object.exports.createWindow (/Users/bobsingor/Github/universal-original/.server/server.js:1:3724755)
- For Tooling issues:
- Node version: v8.9.1
- Platform: Mac
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
static injector error when serving universal-prod #284 - GitHub
Try commenting the ConfigMergeLoader and switch to ConfigStaticLoader (by copying the values from assets/config.local.json to its constructor) ...
Read more >Type script - angular : static injector error - Stack Overflow
Hi i am trying to use socket.io in my angular project. there are three files which i am going to show which are...
Read more >StaticInjectorError(ro): No Provider for | Angular : ng build --prod
fix #NullInjectorError # StaticInjectorError #provider In this video i will show you fix for angular staticinjectorerror nullinjectorerror no ...
Read more >error: staticinjectorerror(dynamictestmodule)[httpclient]
In this lesson you will learn solution of these errors in Angular unit testing of http service.1- Error : ...
Read more >Syndromic Surveillance
surveillance into well-organized business processes serving both ... After decades of investment into developing Universal Prod-.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm fix in webpack.config.ts
@bobsingor @andrey-programmist @sanyagolub @vlados @AnthonyNahas this issue has been fixed 👍