I'm just getting started with NativeScript, and am working through the tutorial: https://docs.nativescript.org/angular/tutorial/ng-chapter-3
NativeScript can't find css files in the same directory as my component, even when specifying the moduleId.
// login.component.ts
@Component({
moduleId: module.id,
styleUrls: [
'./login-common.css',
'./login.android.css',
],
templateUrl: './login.html',
})
export class LoginComponent implements OnDestroy { ... }
My directory structure is:
/app
/pages
/login
login.android.css
login-common.css
login.component.ts
login.html
I've wiped the user data from the emulator, stopped/restarted the app, quadruple-checked the files names, but I still get:
Refreshing application... JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR JS: ns-renderer: File /data/data/org.nativescript.Groceries/files/app/pages/login/.login.android.css does not exist. Resolved from: /data/data/org.nativescript.Groceries/files/app/pages/login/.login.android.css.
I have also tried not specifying the moduleId
value and used paths relative to /app
and I get the same errors. No other components use these files. What am I doing wrong?
Update:
I've made another component and was able to successfully import a component-relative stylesheet. Is there some sort of build-cache that I need to clear?