Issue
Compiling mat-select-autocomplete : es2015 as esm2015
Compiling select-autocomplete : es2015 as esm2015
Error: Failed to compile entry-point mat-select-autocomplete (es2015 as esm2015) due to compilation errors:
node_modules/mat-select-autocomplete/fesm2015/mat-select-autocomplete.js:310:26 - error NG1010: Value at position 3 in the NgModule.imports of SelectAutocompleteModule
is not a reference: [object Object]
310 imports: [
~
311 FormsModule,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
318 ReactiveFormsModule,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
319 ],
~~~~~~~~~~~~~~~~~
Error: Failed to compile entry-point select-autocomplete (es2015 as esm2015) due to compilation errors:
node_modules/select-autocomplete/fesm2015/select-autocomplete.js:247:26 - error NG1010: Value at position 6 in the NgModule.imports of SelectAutocompleteModule is not a reference: [object Object]
247 imports: [BrowserAnimationsModule, MatFormFieldModule, MatSelectModule, FormsModule, ReactiveFormsModule,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248 MatIconModule, MatCheckboxModule, MatButtonModule],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In component.module.ts
import { SelectAutocompleteModule } from 'mat-select-autocomplete';
at NgModule
@NgModule({
imports: [SelectAutocompleteModule]
})
I used
npm i mat-select-autocomplete
npm install select-autocomplete –save
after that when I run the angular I’m getting above error
how to resolve it ?
Solution
It is based on the version
changes in node modules/select-autocomplete/fesm2015/select-autocomplete.js
from
import { MatButtonModule, MatCheckboxModule } from '@angular/material';
to
import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';```
Answered By – Gem
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0