ng (build|serve) -prod
See original GitHub issueWhen I use “ng serve” I have no problem, but when I use “-prod” option I have this warnings on build.
WARNING in ./src/$$_gendir/~/ng-snotify/ng-snotify.ngfactory.ts
70:14-24 "export 'ɵa' (imported as 'import1') was not found in 'ng-snotify'
WARNING in ./src/$$_gendir/~/ng-snotify/ng-snotify.ngfactory.ts
489:37-47 "export 'ɵb' (imported as 'import1') was not found in 'ng-snotify'
WARNING in ./src/$$_gendir/~/ng-snotify/ng-snotify.ngfactory.ts
533:39-49 "export 'ɵa' (imported as 'import1') was not found in 'ng-snotify'
WARNING in ./src/$$_gendir/~/ng-snotify/ng-snotify.ngfactory.ts
538:59-69 "export 'ɵa' (imported as 'import1') was not found in 'ng-snotify'
WARNING in ./src/$$_gendir/~/ng-snotify/ng-snotify.ngfactory.ts
778:37-47 "export 'ɵb' (imported as 'import1') was not found in 'ng-snotify'
The notifications aren’t show, on console browser I have this stack error.
vendor.108d939….bundle.js:197 ERROR TypeError: r is not a constructor
at cn (vendor.108d939….bundle.js:281)
at on (vendor.108d939….bundle.js:281)
at Bn (vendor.108d939….bundle.js:309)
at Object.Fn [as createEmbeddedView] (vendor.108d939….bundle.js:309)
at e.createEmbeddedView (vendor.108d939….bundle.js:386)
at t.createEmbeddedView (vendor.108d939….bundle.js:386)
at vendor.108d939….bundle.js:106
at t.forEachOperation (vendor.108d939….bundle.js:386)
at t._applyChanges (vendor.108d939….bundle.js:106)
at t.ngDoCheck (vendor.108d939….bundle.js:106)
at sn (vendor.108d939….bundle.js:281)
at Yn (vendor.108d939….bundle.js:309)
at Gn (vendor.108d939….bundle.js:309)
at dr (vendor.108d939….bundle.js:309)
at Object.updateDirectives (vendor.108d939….bundle.js:858)
I imported and exported in ShareModule.
import { SnotifyModule, SnotifyService } from 'ng-snotify';
@NgModule({
imports: [
CommonModule,
SnotifyModule
],
exports: [
SnotifyModule
],
providers: [
SnotifyService
],
declarations: []
})
Here do you see my versions libraries.
@angular/cli: 1.1.0
node: 7.4.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/language-service: 4.1.3
@angular/material: 2.0.0-beta.6
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/compiler-cli: 4.1.3
@angular/cli: 1.1.0
Thank you for your project.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >ng build/serve --prod ignores scss url imports if angular.json ...
It works if I don't use the --prod flag, on ng build / serve. importing the css files of my package.json directly in...
Read more >Angular prod build using "ng build /serve -prod"
While working on my Electron application my login functionality didn't function anymore. Contents [hide]. 1 Root Cause; 2 Solution. 2.1 ...
Read more >angular - ng build/serve only use the `environmentSource` file
Whenever I try to prepare build/serve for production env, angular cli only use environmentSource for the env's variables.
Read more >Build Your First Angular Website: #4 Serving and ... - YouTube
We saw how to serve our application in the last lesson using ng ... Build Your First Angular Website: #4 Serving and Building...
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
according to https://github.com/jvandemo/generator-angular2-library/issues/116 (thx @maychan111)
Next update, it should work with AOT compilation
Thanks for your temporary solution, it’s work very well.