私はこれをローカルで問題なく実行していますが、同じことを行うようにJenkinsサーバーを設定した後、gruntがgruntファイルを見つけることができないという問題が発生しています。何かのインストール/構成を見逃した可能性がありますか?エラー出力から何が悪いのかわかりません。これがジェンキンスボックスで得ているものです。
[user @ buildserver]#ls
AUTHORS CHANGELOG coverage Gruntfile.js package.json README.md reports spec src
[user @ buildserver]#うなり声
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
これが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']);
};