Module not found: Error: Can't resolve '@angular/flex-layout' in '/app'
Solution 1
Try adding full read-write access to node_modules folder
chmod -R 777 /node_modules
Then update the node_modules package
npm install
Solution 2
Install the below package to avoid this issue.
npm install @angular/flex-layout
OR add the below code in package.json
and do the npm install
"@angular/flex-layout":"12.0.0-beta.34"
Solution 3
For me, the issue was with the @angular/cdk version.@angular/flex-layout required version 12.0.0 for installation. Simply go to package.json and change the @angular/cdk version to 12.0.0.
Then run npm install -s @angular/flex-layout
Related videos on Youtube
Talk is Cheap Show me Code
I do programming in Angular, Java and JavaScript. A movie freak and love to talk a lot. I really adore the StackOverflow community and proud to be part of it. Cheers.
Updated on June 04, 2022Comments
-
Talk is Cheap Show me Code almost 2 years
I suddenly got this error
Module not found: Error: Can't resolve '@angular/flex-layout' in '\src\app'
This error occurred After I have install @angular/cdk,
After this error I have again installed flex-layout using
npm install @angular/flex-layout
But now there is error for
Module not found: Error: Can't resolve '@angular/http' in '\src\app'
If I Install a http, then some other module is getting missed. How to stop this situation? What has gone wrong?
If I install @angular/http then again it starts with
Module not found: Error: Can't resolve '@angular/flex-layout' in '\src\app'