Skip to content

'unable to resolve processService' error in Nativescript v5.4.0 cli update is stopping commands from running #4623

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

Closed
acembling opened this issue May 15, 2019 · 4 comments
Labels

Comments

@acembling
Copy link

acembling commented May 15, 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.4.0
  • Cross-platform modules: 5.4.0
  • Android Runtime: 5.4.0
  • iOS Runtime: 5.4.0
  • Plugin(s): none

Describe the bug
I have just updated to the latest Nativescript version: v5.4.0, and when I try to run any common tns command for example: tns run ios or tns platform remove ios the command crashes and does not execute.

To Reproduce
Install latest Nativescript cli version
npm install -g nativescript
Create new hello-word app
tns create hello-word
then run:
tns run ios
Then the error occurs

Expected behavior
Command should run

Sample project
Any project

Additional context
See a screenshot below:
Screen Shot 2019-05-15 at 16 21 12
The error is the red message seen above.
Any command like tns run ios doesn't run, I've only found tns doctor to work but still provides the error message.

@Fatme
Copy link
Contributor

Fatme commented May 15, 2019

@Aceman18,

Can you please try tns extension uninstall nativescript-cloud ?

@shirakaba
Copy link

To add to this (we debugged this in the Slack channel), npm install -g [email protected] did solve the problem, so it does appear to be a v5.4.0-specific regression.

@acembling
Copy link
Author

@Fatme Success! That worked!
Do you have anymore information on how thats worked?

@Fatme
Copy link
Contributor

Fatme commented May 15, 2019

@Aceman18,

Let me first explain the purpose of processService. Its main goal was to be a common place for handling all exit signals - exit, SIGINT, SIGTERM. However, handling SIGINT in CLI led to a problem that CTRL+C signal does not exit the process as we have to manually cleanup all resources that prevent Node.js from exiting gracefully. More info can be found here

As we decided to handle the CTRL+C signal in a different manner, we deleted the processService in NativeScript CLI v5.4.0. However, nativescript-cloud-extension uses the processService as well. So, we needed to release a new version of nativescript-cloud that is compatible with both official CLI and the next version of CLI (v5.4.0). And we did it.

After updating NativeScript CLI to v5.4.0, nativescript-cloud is not updated out of the box. So in result, you have the latest version of CLI and the old version of nativescript-cloud extension.

Actually the error unable to resolve processService is not from CLI, it is from nativescript-cloud-extension itself. tns extension uninstall nativescript-cloud do the trick as it removes the old extension - the one that relies on processService. After that, NativeScript CLI installs the latest nativescript-cloud on first execution of any command - the one that doesn't rely on processService and that resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants