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

./gradlew build fails until kotlinNpmInstall run manually #174

Open
arkangelofkaos opened this issue Oct 4, 2023 · 2 comments
Open

./gradlew build fails until kotlinNpmInstall run manually #174

arkangelofkaos opened this issue Oct 4, 2023 · 2 comments

Comments

@arkangelofkaos
Copy link

arkangelofkaos commented Oct 4, 2023

Reproduction:

  1. Clone repo (MacBook Pro, Apple M2 Max, Ventura 13.6)
  2. Run ./gradlew build
  3. Fails

Error message:

> Task :packageNodeJsDistributableWithNCC FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':packageNodeJsDistributableWithNCC' (type 'NodeTask').
  - In plugin 'com.github.node-gradle.node' type 'com.github.gradle.node.task.NodeTask' property '$1' specifies directory '/Users/code/set-aws-sso-credentials/build/js/node_modules' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the directory exists before the task is called.
      2. Make sure that the task which produces the directory is declared as an input.
    
    For more information, please refer to https://docs.gradle.org/8.2.1/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.

More system information:

# java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment Zulu21.28+85-CA (build 21+35)
OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode, sharing)

Manual Fix:
Used IntelliJ to run the nodejs / kotlinNpmInstall gradle task.
That created the missing build/js/node_modules directory.
./gradlew build succeeded after that

@araqnid
Copy link
Owner

araqnid commented Oct 5, 2023

That's odd. I can't reproduce it, and running build from scratch is basically what CI does too. Also the package task does explicitly depend on the kotlinNpmInstall task: https://github.com/araqnid/gradle-kotlin-nodejs-application/blob/296f9a4076071970c19a1a4edaf3efe307c3d3ae/src/main/kotlin/org/araqnid/gradle/kotlin/nodejsapplication/NodeJsApplicationPlugin.kt#L30

@araqnid
Copy link
Owner

araqnid commented Jan 18, 2024

Looks like it needs a new version of https://github.com/araqnid/gradle-kotlin-nodejs-application publishing as that change is unpublished

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

No branches or pull requests

2 participants