Angular 8 target es2015 ng build --prod runtime error
See original GitHub issueπ Bug report
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
NoDescription
When switching the target in tsconfig.json from es5 to es2015 and running `ng build --prod` I get the below error if I try to run the website. The build succeeds.π¬ Minimal Reproduction
I'm away all weekend and not near a computer. I was asked to re-create this from here: https://github.com/angular/angular/issues/30727. On monday if I have time and it's still needed I will try to get some repro steps.π₯ Exception or Error
main-es2015.627b057467d9143e8c32.js:1 ERROR NullInjectorError: StaticInjectorError(i)[class{constructor(t,e,n,r,s,a,u){this.scheduler=new m.e(a,s),this.firestore=a.runOutsideAngular(()=>{const n=Object(m.f)(t,e).firestore();return n.settings(r||k),n}),this.persistenceEnabled$=n&&!Object(w.v)(s)?a.runOutsideAngular(()=>{try{return Object(i.a)(this.firestore.enablePersistence(u||void 0).then(()=>!0,()=>!1))}catch(t){return Object(o.a)(!1)}}):Object(o.a)(!1)}collection(t,e){let n;n="string"==typeof t?this.firestore.collection(t):t;const{ref:r,query:i}=x(n,e);return new y(r,i,this)}collectionGroup(t,e){if(I<6)throw"collection group queries require Firebase JS SDK >= 6.0";const n=e||(t=>t),r=this.firestore.collectionGroup(t);return new b(n(r),this)}doc(t){let e;return e="string"==typeof t?this.firestore.doc(t):t,new v(e,this)}createId(){return this.firestore.collection("_").doc().id}}]:
StaticInjectorError(Platform: core)[class{constructor(t,e,n,r,s,a,u){this.scheduler=new m.e(a,s),this.firestore=a.runOutsideAngular(()=>{const n=Object(m.f)(t,e).firestore();return n.settings(r||k),n}),this.persistenceEnabled$=n&&!Object(w.v)(s)?a.runOutsideAngular(()=>{try{return Object(i.a)(this.firestore.enablePersistence(u||void 0).then(()=>!0,()=>!1))}catch(t){return Object(o.a)(!1)}}):Object(o.a)(!1)}collection(t,e){let n;n="string"==typeof t?this.firestore.collection(t):t;const{ref:r,query:i}=x(n,e);return new y(r,i,this)}collectionGroup(t,e){if(I<6)throw"collection group queries require Firebase JS SDK >= 6.0";const n=e||(t=>t),r=this.firestore.collectionGroup(t);return new b(n(r),this)}doc(t){let e;return e="string"==typeof t?this.firestore.doc(t):t,new v(e,this)}createId(){return this.firestore.collection("_").doc().id}}]:
NullInjectorError: No provider for class{constructor(t,e,n,r,s,a,u){this.scheduler=new m.e(a,s),this.firestore=a.runOutsideAngular(()=>{const n=Object(m.f)(t,e).firestore();return n.settings(r||k),n}),this.persistenceEnabled$=n&&!Object(w.v)(s)?a.runOutsideAngular(()=>{try{return Object(i.a)(this.firestore.enablePersistence(u||void 0).then(()=>!0,()=>!1))}catch(t){return Object(o.a)(!1)}}):Object(o.a)(!1)}collection(t,e){let n;n="string"==typeof t?this.firestore.collection(t):t;const{ref:r,query:i}=x(n,e);return new y(r,i,this)}collectionGroup(t,e){if(I<6)throw"collection group queries require Firebase JS SDK >= 6.0";const n=e||(t=>t),r=this.firestore.collectionGroup(t);return new b(n(r),this)}doc(t){let e;return e="string"==typeof t?this.firestore.doc(t):t,new v(e,this)}createId(){return this.firestore.collection("_").doc().id}}!
π Your Environment
Angular CLI: 8.0.0
Node: 10.15.3
OS: win32 x64
Angular: 8.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.0
@angular-devkit/build-angular 0.800.0
@angular-devkit/build-optimizer 0.800.0
@angular-devkit/build-webpack 0.800.0
@angular-devkit/core 8.0.0
@angular-devkit/schematics 8.0.0
@angular/fire 5.2.0-rc.1
@ngtools/webpack 8.0.0
@schematics/angular 8.0.0
@schematics/update 0.800.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Angular 8 target es2015 ng build --prod runtime error #30727
When switching the target in tsconfig.json from es5 to es2015 and running `ng build --prod` I get the below error if I try...
Read more >Angular: Only building ES2015 on ng build --prod
Show activity on this post. I want the production build output to only produce ES2015 builds and not ES5 builds.
Read more >Angular and Internet Explorer - InDepth.Dev
In this article we will discuss: Getting started with an Angular CLI application; The error in Internet Explorer; The steps necessary to support...
Read more >Angular CLI - Quick Guide - Tutorialspoint
ng version command shows the Angular CLI version installed. ... When true, sets the build configuration to the production target. By default, the...
Read more >Deployment - Angular
For the simplest deployment, create a production build and copy the output directory to a web server. Start with the production build: ng...
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 Free
Top 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

We could solve this issue by deleting our
package-lock.jsonand reinstalling our dependencies withnpm installagain. This way some nested dependencies were removed from thepackage-lock.jsonand from thenode_modulesdirectory.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.