Error when trying to use @angular/material in Stackblitz

Issue

On stackblitz, when trying to add import to Angular Material , like this:

import { MatCheckboxModule } from '@angular/material';

This is the error:

File ‘/turbo_modules/@angular/material@12.0.1/index.d.ts’ is not a module.

Here link to stackblitz
https://stackblitz.com/edit/angular-ivy-11rird?file=src%2Fapp%2Fapp.module.ts

Solution

Added like this

import {  MatCheckboxModule} from '@angular/material/checkbox';

Now it is working.

Answered By – Sarah Jung

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.