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

Error installing grunt-jenkins #12

Closed
emilioestebanez opened this issue Nov 4, 2016 · 5 comments
Closed

Error installing grunt-jenkins #12

emilioestebanez opened this issue Nov 4, 2016 · 5 comments

Comments

@emilioestebanez
Copy link

emilioestebanez commented Nov 4, 2016

Good afternoon,

I'm experiencing the following issue when trying to install grunt-jenkins:

install grunt-jenkins --save-dev
[               ...] - extract:hawk: verb gentlyRm don't care about contents; nuking D:\jenkinsbackupjobs\node_modules\.staging\hawk-aa7b66d5\node_modules

After this nothing happens (I waited more than 30 minutes) and the CPU usage is very high during this time.

I encounter similar issues with different nodejs/npm versions (like nodejs7/npm 3.10.8, nodejs6/npm 3.10.4 nodejs4/npm 2.14.4)

Do you know what can be the cause of this? Thank you very much in advance.

package.json:

{
  "name": "jenkinsbackupjobs",
  "version": "1.0.0",
  "description": "Jenkins Backup Jobs",
  "main": "Gruntfile.js",
  "devDependencies": {
    
  }
}

Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    // ...
    jenkins: {
      serverAddress: 'https://MyJenkinsURL/',
      pipelineDirectory: 'jenkins-pipeline'   // optional, default: 'pipeline'
    }
  });
  grunt.loadNpmTasks('grunt-jenkins');
  // ...
};
@sghill
Copy link
Owner

sghill commented Nov 5, 2016

Thanks for the error report!

It looks like the error was while installing a dependency, so I've upgraded all the dependencies to latest stable and changed CI to run against more recent versions of node. Would you mind trying out 0.7.0 and reporting back?

If it's still not working, it'd be helpful to have a little more information about your environment to help reproduce the problem -- which version of Windows are you on?

@emilioestebanez
Copy link
Author

emilioestebanez commented Nov 7, 2016

Hi,

Thank you for the quick response. I'm afraid it still doesn't work in Windows (Windows 10 64bit, NPM 3.10.8, and I also tried NPM 3.5.2). Now the error is a bit different:

npm install grunt-jenkins --save-dev
[               ...] / extract:sshpk: verb gentlyRm don't care about contents; nuking PATHTO\jenkinsbackupjobs\node_modules\.staging\sshpk-9fcd21ef\node_modules

However the npm install grunt-jenkins --save-dev did work in Linux and copying all the node_modules to Windows then I can run the grunt jenkins-backup-jobs.

But do you know what we can do to fix it in Windows as well?

Thank you!

PS: Do you need any other info about my system?

@sghill
Copy link
Owner

sghill commented Nov 8, 2016

Good news! I was able to reproduce this on Windows. 0.7.1 has just been published with a fix. Could you try that out and verify?

In case you run into this again somewhere -- the problem came down to file length limits in Windows. The traditional limit for a file path in Windows is 260 characters*. The project has a test file with a very long name. Starting with 0.7.1, grunt-jenkins only includes the files it needs to run.

* Windows 10 will apparently let you extend that limit through a change in group policy, but this feels more correct and user-friendly

@emilioestebanez
Copy link
Author

Thank you very much for your quick help! It works perfectly now.

@sghill
Copy link
Owner

sghill commented Nov 8, 2016

Great! Thanks for including a lot of context up front and the quick followups 💯

@sghill sghill closed this as completed Nov 8, 2016
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