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

Investigate issues with M1 on Mac #140

Closed
bitspittle opened this issue Feb 25, 2022 · 4 comments
Closed

Investigate issues with M1 on Mac #140

bitspittle opened this issue Feb 25, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@bitspittle
Copy link
Collaborator

I've heard one report that Mac + M1 fails with an error like so:

> Configure project :
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':kotlinNodeJsSetup'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not find org.nodejs:node:14.17.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom
       - https://maven.pkg.jetbrains.space/public/p/compose/dev/org/nodejs/node/14.17.0/node-14.17.0.pom
       - https://dl.google.com/dl/android/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom
       - https://us-central1-maven.pkg.dev/varabyte-repos/public/org/nodejs/node/14.17.0/node-14.17.0.pom
       - https://nodejs.org/dist/v14.17.0/node-v14.17.0-darwin-arm64.tar.gz
     Required by:
         project :

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':kotlinNodeJsSetup'.
	at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:71)
	at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:49)
	at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:168)
	at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:133)
	at org.gradle.execution.plan.DefaultExecutionPlan.doAddNodes(DefaultExecutionPlan.java:202)
...

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':detachedConfiguration1'.
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1503)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3700(DefaultConfiguration.java:159)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$DefaultResolutionHost.rethrowFailure(DefaultConfiguration.java:2139)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.visitContents(DefaultConfiguration.java:1475)
...

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.nodejs:node:14.17.0.
Searched in the following locations:
  - https://repo.maven.apache.org/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom
  - https://maven.pkg.jetbrains.space/public/p/compose/dev/org/nodejs/node/14.17.0/node-14.17.0.pom
  - https://dl.google.com/dl/android/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom
  - https://us-central1-maven.pkg.dev/varabyte-repos/public/org/nodejs/node/14.17.0/node-14.17.0.pom
  - https://nodejs.org/dist/v14.17.0/node-v14.17.0-darwin-arm64.tar.gz
Required by:
    project :



* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.


BUILD FAILED in 42s
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

Exiting continuous build as no executed tasks declared file system inputs.

Starting a Kobweb server (development).

Full pastebin attached: Kobweb startup failure.txt

@bitspittle bitspittle added the enhancement New feature or request label Feb 25, 2022
@bitspittle
Copy link
Collaborator Author

Seems like this will get fixed (probably) when I can upgrade Kotlin to 1.6.20

A workaround for now is to add the following to your app's build.gradle.kts file:

rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
    rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}

See also: https://youtrack.jetbrains.com/issue/KT-49109

@stalexxx
Copy link

Old version of compose compiler corresponds to old NodeJs with is not available for arm64

@bitspittle
Copy link
Collaborator Author

Old version of compose compiler corresponds to old NodeJs with is not available for arm64

Yeah it's not great. I'm still waiting on web compose to update so we can use newer versions. Did you try the workaround in #140 (comment) ?

@bitspittle
Copy link
Collaborator Author

Note that Kobweb is now updated so latest (0.10.0+) targets later versions of Kotlin and Compose.

I'm going to mark this as closed, because it should have been fixed long ago; however, if anyone is still seeing this with latest, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants