Module build Failed in Angular

“I am using the ng s command and the ng build –configuration command, but I am getting an error.

To solve this:-

I removed the node_modules directory and then reinstalled it, but I am still getting an error.As mentioned below screnshot

Delete node_modules folder :-

Add the following lines to your package.json’s dependency section:

"@babel/generator": "7.22.5",

"@babel/parser": "7.22.5",

"@babel/traverse": "7.22.5",

Run npm install
Then ng serve

(https://i.sstatic.net/COsAtzrk.png)