SASS nativeScript livesync result in an infinite deploy loop
See original GitHub issueFrom @RadouaneRoufid on February 20, 2018 10:2
Tell us about the problem
While running NativeScript app, modifiying a scss file result in an infinite deploy loop.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
- CLI: 3.4.0
- Cross-platform modules: 3.4.0
- Android Runtime: 3.4.1
Please tell us how to recreate the issue in as much detail as possible.
1- Create a basic NativeScript app
2- Create a sass file: _app-common.scss
3- Create another sass file that imports the _app-common.scss: app.android.scss
@import 'app-common';
4- Start NS : tns run android
5- Make a change in _app-common.scss
This results to an infinite loop:
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
Successfully transferred _app-common.scss.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 51477
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
ActivityManager: Start proc 8391:com.domain.project/u0a67 for activity com.domain.project/com.tns.NativeScriptActivity
Successfully transferred all files.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 2510
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 3632
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 5904
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 8040
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
Successfully transferred app.css.
Successfully transferred app.css.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 10054
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Project successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Refreshing application...
JS: NSModuleFactoryLoader is deprecated! You no longer need to provide it as a module loader.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 12166
Successfully synced application com.domain.project on device emulator-5554.
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/env-prepare.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /home/project/nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /home/project/nativescript/hooks/before-prepareJSApp/nativescript-dev-webpack.js
^CProject successfully prepared (Android)
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-android-snapshot.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-sass.js
Executing after-prepare hook from /home/project/nativescript/hooks/after-prepare/nativescript-dev-webpack.js
^CSuccessfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Successfully transferred app.css.
Refreshing application...
Thank you
Copied from original issue: NativeScript/NativeScript#5442
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Trying to use SASS in Nativescript Angular App - Stack Overflow
This error is related to changes in the NativeScript CLI versions 2.5.x that break the SASS plugin with LiveSync.
Read more >nativescript/CHANGELOG.md - UNPKG
The CDN for nativescript. ... LiveSync stops working in Preview app when make change in scss file ... Infinite loop when trying to...
Read more >Source - GitHub
[8.3.3](https://github.com/NativeScript/nativescript-cli/compare/v8.3.2...v8.3.3) ... LiveSync stops working in Preview app when make change in scss file ...
Read more >2m-subdomains.txt - Index of /
... C submodules daemon SampleVideos sass-cache shared Python openstack Plugins ... koha-tmpl archive grails-app perl clients roles deploy jquery terraform ...
Read more >Untitled
... -intro-to-recursion-detecting-an-infinite-loop 2019-02-12T14:03:44-06:00 ... .io/lessons/angular-2-edit-with-live-reloading-using-nativescript-livesync ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @RadouaneRoufid, @noordw, @hosikiti, @jogboms
This should be fixed in latest version of {N} and
nativescript-dev-sass
plugin. Can you please update them and try it on your side?Go to your project folder and execute:
I am also having the same problem with Android or IOS