NativeScript / theme

@nativescript/theme
https://v7.docs.nativescript.org/ui/theme
Apache License 2.0
128 stars 44 forks source link

nativescript-theme-core (2.0.2) File to import not found or unreadable #155

Closed standevo closed 5 years ago

standevo commented 5 years ago

Hi, with latest version of nativescript-theme-core (2.0.2) I get this error

ERROR in ./app.scss
Module build failed (from ../node_modules/sass-loader/lib/loader.js):
File to import not found or unreadable: ~nativescript-theme-core/scss/platforms/index.ios.
      in myproject/native/src/app.scss (line 6, column 1)
 @ ../node_modules/nativescript-dev-webpack/load-application-css-angular.js 5:49-65
 @ ./main.ts
bundyo commented 5 years ago

There is no such file (or folder) in 2.0.x. Check the next branch readme. In short you need to load the JavaScript in app.js and core + skin in your CSS/SCSS.

radiant-alex commented 5 years ago

What about TypeScript? how to make 2.0.2 working in TypeScript angular project?...

bundyo commented 5 years ago

The same as in JavaScript - import the needed root JS file and CSS/SCSS files.

markosole commented 5 years ago

HI @bundyo can you please clarify this In short you need to load the JavaScript in app.js How do we import it? Another thing, after updating to 2.0.x and reverting back to 1.0.x, old styles are still not being applied.

carlosdelfino commented 5 years ago

I used the import below in the main.ts file, but I still have problems:

import  "nativescript-theme-core";

error:


ERROR in ./app.scss
Module build failed (from ../node_modules/sass-loader/lib/loader.js):

undefined
^
      File to import not found or unreadable: ./scss/core.
      in C:\Users\Admin\workspace\islamic-works\Islamic-App\node_modules\nativescript-theme-core\core.scss (line 8, column 1)
 @ ../node_modules/nativescript-dev-webpack/load-application-css-angular.js 5:49-65
 @ ./main.ts
Webpack compilation complete.
Executing webpack failed with exit code 2.
# tns prepare

My app.android.scss:

@import "~nativescript-theme-core/core";
@import "~nativescript-theme-core/blue";

@import "app-variables";
@import "app-common";
carlosdelfino commented 5 years ago

I only succeeded by importing the following file: @import "nativescript-theme-core/scss/core/_index";

drophit commented 5 years ago

This might be the single WORST migration that i think i have ever seen (in 30 yrs) with respect to backwards compatibility - go ahead and spin up the side drawer sample app and then do the migration reccomendation taht appears in MASSIVE view accross the top of sidekick and then see what the app looks like - WTF!!! - for those of us who based our apps around this template this is a disaster. Great work Progress - who is leading this team??

drophit commented 5 years ago

Can anyone explain how to get the drawer navigation template to work properly with this new BS?