NativeScript/nativescript-dev-sass

New files not compile

nikis opened this issue · 4 comments

nikis commented
  1. tns create test-app --ng
  2. npm i nativescript-dev-sass --save-dev
  3. tns run android
  4. If create new file item.component.scss i need to stop the app and run again tns run android , otherwise item.component.css will not be created and got error "Error: Could not resolve /data/data/XXX/files/app/item/item.component.css"

Hi @nikis,

Which version of NativeScript are you using? Please, run tns info and paste the result here. Thanks!

nikis commented
┌──────────────────┬─────────────────┬────────────────┬──────────────────┐
│ Component        │ Current version │ Latest version │ Information      │
│ nativescript     │ 3.3.1           │ 3.4.0          │ Update available │
│ tns-core-modules │ 3.3.0           │ 3.4.0          │ Update available │
│ tns-android      │ 3.3.1           │ 3.4.0          │ Update available │
│ tns-ios          │                 │ 3.4.0          │ Not installed    │
└──────────────────┴─────────────────┴────────────────┴──────────────────┘

package.json

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.tuzari",
    "tns-android": {
      "version": "3.3.1"
    }
  },
  "dependencies": {
    "@angular/animations": "~4.4.1",
    "@angular/common": "~4.4.1",
    "@angular/compiler": "~4.4.1",
    "@angular/core": "~4.4.1",
    "@angular/forms": "~4.4.1",
    "@angular/http": "~4.4.1",
    "@angular/platform-browser": "~4.4.1",
    "@angular/router": "~4.4.1",
    "nativescript-angular": "~4.4.0",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.4.2",
    "tns-core-modules": "~3.3.0",
    "zone.js": "~0.8.2"
  },
  "devDependencies": {
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "lazy": "1.0.11",
    "nativescript-angular-cli": "^0.1.9",
    "nativescript-dev-sass": "^1.3.5",
    "nativescript-dev-typescript": "~0.5.0",
    "typescript": "~2.4.2"
  }
}

Hi @nikis ,

We're not able to reproduce this exact error, but what we see is that node-sass exists with code 1 if there is no any scss file to compile. So if you add one sass file and run tns run android, adding new scss files after that or changing existing ones should not be an issue. So doing step 4 before step 3 should solve your issue.

In the meantime, if the problem you mention still exists, could you send us a NativeScript playground link with project where this behavior is reproducible?

Best regards,
Veselina

Closing this due to Insufficient data and not able to reproduce using v1.5.0 of the plugin which utilizes chokidar watcher.