The command was being run with WSL’s bash (installed at C:\Windows\System32\bash.exe) rather than MSYS’s bash. Both were in path, but since System32 is earlier in PATH, WSL’s bash wins.
I fixed the issue by running C:\msys64\usr\bin\bash.exe tools/install-n2 instead.
The node_modules step on running .\run seems to be taking a lot of time, much more than I am used to seeing in WSL on the same computer. It hasn’t completed yet.
Finished `release` profile [optimized] target(s) in 1.19s
[===============- ] 25/66 done, 1/1 running
node_modules (2231s)
? Do you want to continue? [Y/n]
.\yarn install
C:\Users\User\GitHub\anki>call .\out\extracted\node\yarn install
! Corepack is about to download https://repo.yarnpkg.com/4.6.0/packages/yarnpkg-cli/bin/yarn.js
? Do you want to continue? [Y/n] y
➤ YN0065: Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry
➤ YN0065: Run yarn config set --home enableTelemetry 0 to disable
➤ YN0000: · Yarn 4.6.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 268ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ anki@workspace:. doesn't provide sass-embedded (p85ef9), requested by esbuild-sass-plugin and other dependencies.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 649 packages were added to the project (+ 523.98 MiB).
➤ YN0000: └ Completed in 45s 974ms
➤ YN0000: ┌ Link step
➤ YN0004: │ dprint@npm:0.47.4 lists build scripts, but all build scripts have been disabled.
➤ YN0004: │ esbuild@npm:0.25.3 lists build scripts, but all build scripts have been disabled.
➤ YN0004: │ esbuild@npm:0.25.5 lists build scripts, but all build scripts have been disabled.
➤ YN0004: │ svelte-preprocess@npm:6.0.3 [f4825] lists build scripts, but all build scripts have been disabled.
➤ YN0000: └ Completed in 55s 479ms
➤ YN0000: · Done with warnings in 1m 42s
After this, .\run finished the rest of the tasks in 102 seconds.
Finished `release` profile [optimized] target(s) in 0.68s
n2: ran 41 tasks, now up to date
Build succeeded in 102.09s.
I think that yarn was just indefinitely waiting for approval here:
! Corepack is about to download https://repo.yarnpkg.com/4.6.0/packages/yarnpkg-cli/bin/yarn.js
? Do you want to continue? [Y/n] y
But, this is still a bug in the build script that needs to be fixed. As I said above, pressing y when the message was shown on running .\run didn’t do anything.
To trigger the issue again, I need to go back to the state before .\yarn install. How to do that without removing the compiled rust packages?
I tried rm -rf node_modules and rm -rf out\node_modules. I confirmed that the directories were cleared and then ran .\run again. This time the issue didn’t occur, presumably because the state before .\yarn install wasn’t exactly restored.
I tried .\yarn uninstall too but that returned Couldn't find a script named "uninstall".
I couldn’t trigger it after running rm -rf out and rm -rf ts\.svelte-kit and even after deleting the whole anki folder. So, I think that yarn saved the approval somewhere system-wide.
Maybe the next person who hits this issue should try setting the COREPACK_ENABLE_DOWNLOAD_PROMPT=0 env var to see if it helps?