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

Could not get unknown property 'npm_run_build' for project #372

Open
maruthijr opened this issue Nov 20, 2020 · 1 comment
Open

Could not get unknown property 'npm_run_build' for project #372

maruthijr opened this issue Nov 20, 2020 · 1 comment

Comments

@maruthijr
Copy link

maruthijr commented Nov 20, 2020

Gradle file:
`buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.node-gradle:gradle-node-plugin:3.0.0-rc4"
}
}

apply plugin: "com.github.node-gradle.node"

node {
download = true
version = "12.18.3"
}

task some_task {
doLast {

}
}

npm_run_build.dependsOn(some_task)
`
gradle npm_run_build

Could not get unknown property 'npm_run_build' for project ':frontend' of type org.gradle.api.Project.

Second issues:
I cannot depend on this task in another module like this:
dependsOn ':frontend:npm_run_build'

Task with path ':frontend:npm_run_build' not found in project ':deploy'.

@deepy
Copy link

deepy commented Nov 24, 2020

Does it work if you change to the following?

tasks.named("npm_run_build").configure {
    dependsOn tasks.getByName("some_task")
}

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