Home >Web Front-end >CSS Tutorial >How to Fix 'no such file or directory' Errors When Migrating Angular-CLI from CSS to SCSS?
Error Troubleshooting: Converting Angular-CLI from CSS to SCSS
When transitioning an Angular-CLI project from traditional CSS styles to SCSS, you may encounter an error stating "no such file or directory, open '/Users/Egen/Code/angular/src/styles.css'".
For Angular 6 and Above:
ng config defaults.styleExt=scss
For Angular 5.x and Older:
ng config schematics.@schematics/angular:component.styleext scss
Additional Steps:
For New Projects:
ng new your-project-name --style=scss
ng config --global defaults.styleExt=scss
By implementing these steps, you should be able to successfully convert your Angular-CLI project from CSS to SCSS.
The above is the detailed content of How to Fix 'no such file or directory' Errors When Migrating Angular-CLI from CSS to SCSS?. For more information, please follow other related articles on the PHP Chinese website!