Reputation: 13
I have created a nativescript angular app using "tns create my-app --template ng" in the nativescript cli, then installed the android platform with "tns platform add android". The application then runs perfectly on the android emulator using "tns run android".
To enable the use of SASS for styling, I followed the instructions here "https://docs.nativescript.org/ui/theme". This includes installing the SASS plugin and creating the basic scss files in the app directory. Now, when I try to run my app I get the following error:
"First call of getPlatformData without providing projectData."
I have repeated the process a number of times but the result remains the same. Any ideas? (Using nativescript v2.5)
Upvotes: 1
Views: 3219
Reputation: 5538
This error is related to changes in the NativeScript CLI versions 2.5.x that break the SASS plugin with LiveSync. I've updated the plugin tonight so that it will work with both NativeScript 2.4.x and with the upcoming NativeScript 3.0.
In NativeScript 2.5, the plugin should transpile SCSS to CSS, but LiveSync will not work correctly.
So for now, either downgrade your CLI to 2.4.2 OR try-out the new RC release for 3.0.0-rc. With either of these CLI versions installed, the SASS plugin should work again (with LiveSync).
Try the latest version of the plugin in your project by doing this:
$ tns plugin remove nativescript-dev-sass
$ npm install nativescript-dev-sass@rc --save-dev
Hopefully this works better. Sorry for the trouble.
(NOTE: The plugin will drop the RC tag once {N} 3.0.0 officially ships)
UPDATE
The changes to this plugin for {N} 2.5+ are now official and available simply by installing the latest version (no need for RC tag). If you're using {N} 2.4.2 or lower, it's still best to use the older version of this plugin. To install the older version:
$ npm install [email protected] --save-dev
Upvotes: 2