Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
107
rated 0 times [  112] [ 5]  / answers: 1 / hits: 18754  / 11 Years ago, mon, march 25, 2013, 12:00:00

I have grunt running this just fine locally, however after setting up my Jenkins server to do the same thing I'm running into a problem with grunt being unable to find the grunt file. Could I have missed installing/configuring something? I can't tell what's wrong from the error output, here is what i'm getting on the jenkins box:



[user@buildserver]# ls



AUTHORS  CHANGELOG  coverage  Gruntfile.js  package.json  README.md  reports  spec  src


[user@buildserver]# grunt



grunt-cli: The grunt command line interface. (v0.1.6)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started


Here's the Gruntfile.js



module.exports = function(grunt) {
'use strict';

// Project configuration.
grunt.initConfig({
jasmine : {
src : 'src/**/*.js',
options : {
specs : 'spec/**/*.js',
template : require('grunt-template-jasmine-istanbul'),
templateOptions: {
coverage: 'reports/coverage.json',
report: 'reports/coverage'
}
}
},
});

grunt.loadNpmTasks('grunt-contrib-jasmine');

grunt.registerTask('default', ['jasmine']);
};

More From » gruntjs

 Answers
10

Have you installed grunt in your Jenkins server?



npm install grunt

[#79367] Sunday, March 24, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
carterf

Total Points: 255
Total Questions: 93
Total Answers: 122

Location: Marshall Islands
Member since Wed, Jun 17, 2020
4 Years ago
;