question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng g c myComponentName not creating SCSS files but CSS

See original GitHub issue

Hi!

I am sorry for disturbing. I can’t generate SCSS files using ng g c myComponentName command.

I know there were an issue opened related to that, but I could not make kit work following the same steps: #158

I created a repo where it can be reproduced: https://github.com/jdavidhermoso/nx-not-generating-scss

These are the steps I followed:

  1. Create workspace: npx --ignore-existing create-nx-workspace myorg
  2. Add capability to create Angular Apps ng add @nrwl/angular --defaults
  3. Create Angular App: ng g @nrwl/angular:application todos
  4. Setting styleext prop to scss: ng config schematics.@nrwl/schematics:component.styleext scss
  5. Generate component in the todos app: ng g c myComponentName --project=todos

I’m probably making something bad, but I can’t figure out what.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
vsavkincommented, Jun 19, 2019

Since we moved all the angular functionality into @nrwl/angular, you need to change the collection.

So instead of

Setting styleext prop to scss: ng config schematics.@nrwl/schematics:component.styleext scss

You need to do

Setting styleext prop to scss: ng config schematics.@nrwl/angular:component.styleext scss
0reactions
ilyasKerbalcommented, Apr 28, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

"ng g c" is not creating scss style extension unless ... - GitHub
Hi, for those who are using Angular 9, this works on my project. On our angular.json file do this: To fix it, open...
Read more >
angular cli generate component in library doesn't create scss file
I expected that when I run ng g c footer it would create the component without the test file and with a SCSS...
Read more >
How to Structure SCSS in an Angular App - Medium
When creating a new Angular app using the ng new app-name command, ... SCSS files instead of CSS files when you create new...
Read more >
ng generate - Angular
Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root...
Read more >
Use Single File Components By Default in Angular - Sam Julien
By default, the Angular CLI generates components with separate CSS and template files. If that works for you, great! If you don't like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found