Skip to content

Fix "Error: spawn npm ENOENT" on windows #221

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

Merged
merged 1 commit into from
Jan 25, 2022
Merged

Fix "Error: spawn npm ENOENT" on windows #221

merged 1 commit into from
Jan 25, 2022

Conversation

viszkoktamas
Copy link
Contributor

@viszkoktamas viszkoktamas commented Jan 17, 2022

I was running this lib on windows with a few npm_dependencies and i got this spawn npm error.
asd

Fixed with the solution posted on SO: https://stackoverflow.com/a/43285131/11882999

@shawnlobo96
Copy link

@viszkoktamas what version of the CLI are you using?

This issue was fixed in 1.11.2.

If you're using something older than 1.11.2, can you give it a try with the latest CLI version?

@viszkoktamas
Copy link
Contributor Author

viszkoktamas commented Jan 17, 2022

@shawnlobo96 I've just upgraded to 1.11.2, now the cli doesn't fails on the error, but the problem is still exists, check this screenshot:
image

Test run fails on missing dependency of course (the error message is a bit confusing, but same setup works using Ubuntu, and the error message in the first screenshot implies that it is caused by the npm spawn error):
image

We are using glob module, which is added to the npm_dependencies, but it is not installed because the spawn command can't find the npm on windows. The change in this PR fixes the problem.

@nagpalkaran95 nagpalkaran95 merged commit d322fbe into browserstack:master Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants