Official repo of the Angular 6+ Qr Code module source code
MIT License
3
stars
3
forks
source link
ERROR in : Unexpected value 'QrCodeAllModule in XX/node_modules/ngx-qrcode-all/QrCodeAllModule/qrCodeAll.module.d.ts' imported by the module 'QrCodeModule in XXX/src/app/qr-code/qr-code.module.ts'. Please add a @NgModule annotation. #2
I created a new application and keep getting this error when I build the project for prod (ng build --prod). Package Json dependencies:
"dependencies": { "@angular/animations": "^6.1.0", "@angular/common": "^6.1.0", "@angular/compiler": "^6.1.0", "@angular/core": "^6.1.0", "@angular/forms": "^6.1.0", "@angular/http": "^6.1.0", "@angular/platform-browser": "^6.1.0", "@angular/platform-browser-dynamic": "^6.1.0", "@angular/router": "^6.1.0", "core-js": "^2.5.4", "ngx-qrcode-all": "^1.2.1", "rxjs": "^6.0.0", "zone.js": "~0.8.26" },
AppModule:
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core';
import { AppComponent } from './app.component'; import { CommonModule } from '@angular/common'; import { QrCodeAllModule } from 'ngx-qrcode-all';
@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, CommonModule, QrCodeAllModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
It works fine when I serve it (ng serve) but fails when I build for production (ng build --prod). Please help.