-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Exception applying plugin on Windows ARM64 device #315
Comments
Oop, yeah this should be an easy fix But a quick patch that supports nodejs 20 and later is easy enough and I'll get to that later today |
And running with |
Would something like this Powershell command work? (Get-WmiObject Win32_Processor).Architecture It should output I attempted the workaround of setting |
PowerShell would probably work fine, I'll double-check if it's fast enough next week when my vacation starts And if you clone this repository you should be able to use |
I can't run --- a/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt (revision 92e1d218789d9c69266ad58328a6a698e80ec94e)
+++ b/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt (date 1721287621026)
@@ -36,7 +36,9 @@
fun main(args: Array<String>) {
val osName = System.getProperty("os.name")
val osArch = System.getProperty("os.arch")
- val uname = { execute("uname", "-m", timeout = 10) }
+ val uname = { execute("powershell", "-command", "(Get-WmiObject Win32_Processor).Architecture", timeout = 10)
+ .mapIf({it == "12"}) { "arm64" }
+ .mapIf({it == "9"}) { "x64" } }
val platform = parsePlatform(osName, osArch, uname)
println("Your os.name is: '${osName}' and is parsed as: '${platform.name}'") Outputs:
|
This adds initial support for ARM64, but it's slightly limited as I couldn't get acquire a compatible device. The powershell invocation is somewhat slow (sometimes taking almost 700ms with my profile), which is unfortunate becuase it'd be way smoother to parse than the current os.arch solution
* 7.x: 7.1.0 Add license to POM #319 Update CHANGELOG Support for AIX OS on ppc64 Drop incorrect node_modules input from documentation and tests Remove incorrect node_modules input in pnpm test fixture Add support for ARM64 Windows #315 Update documentation NodeSetupTask should not delete general files, only old node versions #297
This is fixed in |
Hello,
I am encountering an error when attempting to apply this plugin to my project on a Windows ARM64 device. The same plugin configuration on a Windows x64 device builds successfully. The error from the build is as follows:
This error can be reproduced with just this for the
build.gradle.kts
:Device / Version information:
Full stack trace when building with
./gradlew.bat build --stacktrace
:The text was updated successfully, but these errors were encountered: