Skip to content

Conversation

@Maschga
Copy link

@Maschga Maschga commented Oct 9, 2025

Description

With this setup, running commands like npm run XXX works on Windows.
If support for Windows is not desired, then the PR can be closed.

DONE:

  • require.resolve() -> require()
  • .gradlew -> gradlew
  • running scripts with sh prefix
  • ; -> &&
  • cd - -> cd ..

TODO:

  • testing on Linux

@Maschga Maschga mentioned this pull request Oct 9, 2025
2 tasks
@noomorph
Copy link
Collaborator

noomorph commented Oct 9, 2025

Hi, @Maschga , which flows did not work for you - what practical issues for yourself as a contributor you were trying to fix? I assume most of the work was around launching test project app, right? Could you elaborate a bit more, please?

P.S. Also: cmd? powershell? wsl? wsl2? cygwin? mingw? I mean to clarify for which environment you tried to solve the problems... 🤔 IIRC, there is a gazillion of ways to cook node.js project on Windows, so some specificity won't hurt.

@Maschga
Copy link
Author

Maschga commented Oct 9, 2025

This PR is related to #4837 (comment).
Basically every workflow including the ./gradlew command did not work.
In addition, running npm run test:android-debug / npm run e2e:android-debug resulted in a ERR_UNSUPPORTED_ESM_URL_SCHEME error.

I use Windows 11 with Git Bash with Node.js v22.20.0.
Please let me know, if you need further information.

@gosha212
Copy link
Contributor

gosha212 commented Oct 9, 2025

@Maschga But this way it will stop working on linux / mac

@Maschga
Copy link
Author

Maschga commented Oct 9, 2025

What exactly doesn't work? Which error messages do you get?
Maybe we can find a good solution.

@gosha212
Copy link
Contributor

all executables on mac / linux should be executed with ./xxx

@Maschga
Copy link
Author

Maschga commented Oct 15, 2025

Got a nice fix for Windows user:
Running

npm config set script-shell "C:\Program Files\Git\git-bash.exe"

sets the npm-shell to Git Bash (assuming Git is installed) in the user directory (~/.npmrc).
Everytime I run npm run XXX it opens a Git Bash Shell in which the script is executed.

@Maschga Maschga closed this Oct 15, 2025
@Maschga Maschga deleted the fix/windows branch October 15, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants