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

npmInstall Task Error - Cannot find module npm-cli.js #9

Open
HieronyM opened this issue Aug 10, 2015 · 2 comments
Open

npmInstall Task Error - Cannot find module npm-cli.js #9

HieronyM opened this issue Aug 10, 2015 · 2 comments

Comments

@HieronyM
Copy link

Dear @srs,

It such a great plugin you make to enable usage of Gulp in Gradle.
But i'm hitting the wall when implement gulp in my build script.

Here's my build script

plugins {
    id "com.moowork.gulp" version "0.10"
}

apply plugin: 'groovy'
apply plugin: 'com.moowork.gulp'

defaultTasks 'clean', 'build'

def srcDir = new File(projectDir, "web")
def targetDir = new File(project.buildDir, "web")
gulp_build.inputs.dir srcDir
gulp_build.outputs.dir targetDir

// makes sure on each build that gulp is installed
gulp_build.dependsOn 'installGulp'

// processes your package.json before running gulp build
gulp_build.dependsOn 'npmInstall'

// runs "gulp build" as part of your gradle build
build.dependsOn gulp_build

When I try command gradle clean build, I got error that say it cannot find module npm-cli.js
I am new in Gulp, please help me figure out what's wrong in my configurations.

Thanks.

@srs
Copy link
Owner

srs commented Aug 10, 2015

Hi.

Can you try to add the following right after the plugins-clause?

node {
  download = true
}

@HieronyM
Copy link
Author

Hi @srs

I have added it, problem solved.
Anyway, I have Question what is the function of the package.json file?
And what configuration must added to package.json file?

Thanks.

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