-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tns-android
inside dependencies when tns build/run android
fails
#2547
Comments
The underlying problem is a lot different than we first anticipated, and thus the supposed "fix" cannot handle the inconsistent CLI behavior. I'll look into a more general solution. |
The same happens with those steps:
Project is broken and no chance to get in working until you manually delete Workaround: |
One idea to handle this is to attach to process exit signals in the block where we install tns-android as dependency, for example here. this.$processService.attachToProcessExitSignals(this, () => {
const packageJsonContent = this.$fs.readJson(pathToPackageJson);
if (packageJsonContent && packageJsonContent.dependencies && packageJsonContent.dependencies["tns-android"] ) {
delete packageJsonContent.dependencies["tns-android"];
this.$fs.writeJson(pathToPackageJson, packageJsonContent);
}
} This way, in case Ctrl + C is used during installation of the runtime, before exiting the process, CLI will execute the logic in the lambda and will not leave the project in incorrect state. |
With latest changes, this issue is no longer valid as runtimes are not added as dependencies of the project anymore (and removed after that). The new behavior will be available in CLI 4.2.0 |
Steps to reproduce:
Result:
tns-android
is found in dependencies of package.json.This later breaks
tns platform add/remove android
The text was updated successfully, but these errors were encountered: