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

[Bug] Unable to download node on Mac with ARM chips #176

Open
shiveenp opened this issue Jan 1, 2022 · 5 comments
Open

[Bug] Unable to download node on Mac with ARM chips #176

shiveenp opened this issue Jan 1, 2022 · 5 comments
Assignees
Labels
Data missing Issue cannot be fixed until additional data is provided by end users Feature Request of a new feature

Comments

@shiveenp
Copy link

shiveenp commented Jan 1, 2022


Hi,

To start off, thanks for the great plugin!

What I am trying to do:

I am trying to build my frontend using the latest version of the plugin on JDK11+. Here's my config in build.gradle.kts:

plugins {
    id("org.siouan.frontend-jdk11") version "6.0.0"
}

frontend {
    nodeVersion.set("14.17.3")
    assembleScript.set("run build")
}

Expected results: Node is installed and can build the project.
Actual results: installNode task throws an exception when downloading node for Mac M1x.

> Task :frontend:installNode FAILED
Caching disabled for task ':frontend:installNode' because:
  Build cache is disabled
Task ':frontend:installNode' is not up-to-date because:
  Task has failed previously.
Not watching anything anymore
Watching 0 directory hierarchies to track changes
[installNode] Removing install directory '/Users/shiveenpandita/dev/Taggit/frontend/node'
[installNode] Downloading distribution at 'https://nodejs.org/dist/v14.17.3/node-v14.17.3-darwin-arm64.tar.gz'
[installNode] Downloading resource at 'https://nodejs.org/dist/v14.17.3/node-v14.17.3-darwin-arm64.tar.gz' (proxy: DIRECT)
Watching 1 directory hierarchies to track changes
:frontend:installNode (Thread[Execution worker for ':',5,main]) completed. Took 0.081 secs.

Environment

  • OS: Mac OS Monterey
  • JDK: AdoptOpen Temurin JDK 17
  • Gradle: Gradle 7.3
  • Frontend Gradle plugin: 6.0.0 JDK11

I saw this issue #165 which implies that the problem is fixed but following the commits I could only see it fixed inside the JDK8 build.

@shiveenp
Copy link
Author

shiveenp commented Jan 1, 2022

For now I have fixed by adding
nodeDistributionUrlPathPattern.set("vVERSION/node-vVERSION-darwin-x64.TYPE") in the frontend config.

@v1nc3n4
Copy link
Member

v1nc3n4 commented Jan 2, 2022

Hi,

Thank you for posting this issue and providing detailed info.
However, the problem still appears to me ambiguous:

What I am trying to do:

I am trying to build my frontend using the latest version of the plugin on JDK11+. Here's my config in build.gradle.kts:

plugins {
id("org.siouan.frontend-jdk11") version "6.0.0"
}

frontend {
nodeVersion.set("14.17.3")
assembleScript.set("run build")
}

Expected results: Node is installed and can build the project.
Actual results: installNode task throws an exception when downloading node for Mac M1x.

You did not paste the exception you are talking about. The log output you provided shows a successful downloading of a Node distribution.
Can you provide the exact exception you saw with this simple configuration?

Thank you for your help!
BR

@v1nc3n4
Copy link
Member

v1nc3n4 commented Jan 19, 2022

Hi @shiveenp,
Can you provide the initial exception you encoutered before hard-coding the path pattern?
Thank you very much for your help!
BR

@v1nc3n4
Copy link
Member

v1nc3n4 commented Jun 28, 2022

Hi @shiveenp,

In the next days, I'd like to fix the issue you encountered, but for this, I need the exact exception you were talking about in your first message:

Expected results: Node is installed and can build the project.
Actual results: installNode task throws an exception when downloading node for Mac M1x.

I guess the exception is named UnsupportedPlatformException. But I need the whole message, as mentioned in the FAQ.

Thanks again for your help!
BR

@v1nc3n4 v1nc3n4 self-assigned this Jul 24, 2023
@v1nc3n4 v1nc3n4 added the Feature Request of a new feature label Jul 24, 2023
@bric3
Copy link

bric3 commented Nov 15, 2023

FYI on version 6.0.0, on an Apple M1 laptop node is correctly installed without special configurations.

$ file excalidraw-assets/build/node/bin/node
excalidraw-assets/build/node/bin/node: Mach-O 64-bit executable arm64

I'm using node 20.9.0, however node 14.17.3 releases did not have yet ARM64 builds for macOs at that time.

https://nodejs.org/en/blog/release/v14.17.3

image

@v1nc3n4 v1nc3n4 added the Data missing Issue cannot be fixed until additional data is provided by end users label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data missing Issue cannot be fixed until additional data is provided by end users Feature Request of a new feature
Projects
None yet
Development

No branches or pull requests

3 participants