Skip to content
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

Cannot execute npm Task #9335

Closed
tsmaeder opened this issue Apr 13, 2021 · 6 comments
Closed

Cannot execute npm Task #9335

tsmaeder opened this issue Apr 13, 2021 · 6 comments
Assignees
Labels
bug bugs found in the application tasks issues related to the task system

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

When I try to execute detected tasks, I get a failure message saying "Error launching task '': Error starting process (ENOENT)"

Steps to Reproduce:

  1. Build & Run Browser example
  2. Open a workspace with a npm example, for example https://github.com/Axosoft/nsfw
  3. Do a "Run Task..." and pick a task, for example 'lint' in the above example
  4. Observe: the task is not executed and you get an error dialog.

Additional Information

  • Operating System: Window 10
  • Theia Version: master
@tsmaeder tsmaeder added tasks issues related to the task system OS/Windows issues related to the Windows OS labels Apr 13, 2021
@tsmaeder
Copy link
Contributor Author

Hmh...this is not restricted to Windows. Problem seems to be that we're trying to run the file npm run test, for example instead of just npm plus arguments

@tsmaeder tsmaeder removed the OS/Windows issues related to the Windows OS label Apr 13, 2021
@tsmaeder tsmaeder changed the title Cannot execute npm Task on Windows Cannot execute npm Task Apr 13, 2021
@RomanNikitenko RomanNikitenko added the bug bugs found in the application label Apr 13, 2021
@RomanNikitenko
Copy link
Contributor

I did git reset locally to the commit 221d90e, so it's before these changes #9189

npm tasks work well for me, so it looks like the current issue is a regression after merging #9189
thanks if someone could check it as well...

@tsmaeder
Copy link
Contributor Author

Hmmm I cannot reproduce the problem with that commit, neither. However, I don't really understand yet how that commit broke the npm tasks. I'll have to debug through it.

@tsmaeder
Copy link
Contributor Author

Funnily, parsing the command line (like we used to do) fixes the problem, as well. I think we're just not hitting the "shell" case anymore and are using the 'process' case for running the command.

@tsmaeder
Copy link
Contributor Author

A candidate for the relevant change is here: https://github.com/eclipse-theia/theia/pull/9189/files#diff-89cc6d20975ccb34aa4eda6fa7202f6817bb30ef36391d2ca36093e88a706440L1888
Note that the the TaskDefinition.type' is no longer updated to be shell, for example. Since the typefield is queried inTaskProcessRunner` that could make use fall into the default case in this if-else:

if (taskConfig.type === 'shell') {

@RomanNikitenko
Copy link
Contributor

@tsmaeder
should we close the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application tasks issues related to the task system
Projects
None yet
Development

No branches or pull requests

2 participants