nativescript-schematics
nativescript-schematics copied to clipboard
@nativescript/schematics problem : cloudn't generate .scss file by using ng-cli
running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: @angular/cli 8.3.0
- Node: 12.7.0
- Cross-platform modules: Angular 8.2.3
- Android Runtime:
- iOS Runtime: none
- Plugin(s): @nativescript/schematics
Describe the bug from this pageangular-cli ,and I run this two command line:
npm i --save-dev @angular/cli
npm i --save-dev @nativescript/schematics
then I thought maybe I could generate a component by using
ng g c pages/landing --style=scss
however I got this:
Unknown option: '--style'
And then I thought maybe I could modify angular.json
file in this project in order to generate scss file, here is what I change
"schematics": { "@schematics/angular:component": { "style": "sass" } }
then I got this:
Failed to find generated component file /landing.component.css. Please contact the @nativescript/schematics author.
I'm having this issue as well. I can confirm that --style=scss
works in a non-nativescript angular project, but not in a nativescript project. I updated angular/cli to latest.
New components that are generated (without the --style
option) by the cli will not generate .scss files, only .css, which I need to then rename. I set this in angular.json
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
}
Sass is working in general, though.
I'm getting the same error when wanting to specify inline-styles with with the --inline-style
flag or -s
shortcut.
I've updated the angular.json
file and it works fine when not specifying the --inline-style
flag
I'm running into the exact same problem as described by eugenehiggins. Is there a solution for this problem?
downgrading the schematics version in angular.json worked for me. Changed it to below version. "@nativescript/schematics": "^0.2.4",