Nx: ng g c myComponentName not creating SCSS files but CSS

Created on 13 Jun 2019  路  7Comments  路  Source: nrwl/nx

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.

bug

Most helpful comment

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

All 7 comments

I am seeing the same issue too after the upgrade to v8

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

@FrozenPandaz maybe we can update our migration to print a warning about @nrwl/schematics defaults in angular.json?

Thank you for this one, I noticed it as well, wasn't sure if it was something I was doing wrong.

Thanks, @vsavkin :)

thanks

Was this page helpful?
0 / 5 - 0 ratings