Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When you have devices with different platorm, since NativeScript CLI 3.1.3, you can use
tns run
command to run your app simultaneously on all devices.However, when a change is applied, CLI prepares the project for the first platform (for example iOS) and syncs it to all available iOS devices and simulators.
After that, the project is prepared for the other platform (Android in this case) and syncs the changes to all available Android devices and emulators.
The first prepare (for iOS) will parse all
.less
files and will create.css
files for each of them.The second prepare (for Android) will do the same and will rewrite the files. At this point CLI is watching for file changes and will detect the new
.css
files (they have the same content, but they are newly created files, as the plugin is always writing) and will trigger new prepare steps.And this continues indefinetely.
In order to fix it, check the content of the output.css file with the current content of the file and if they are the same, do not overwrite the file.
This way the first prepare (for iOS) will create all
.css
files, the prepare for Android will not overwrite them and CLI will not go into infinite loop.Fixes NativeScript/nativescript-cli#3017