[英]Error running Grunt on Windows : Fatal error: Unable to find local grunt
[英]Unable to find local grunt
我已經在本地運行這個很好的grunt,但是在設置我的Jenkins服務器做同樣的事情之后我遇到了grunt無法找到grunt文件的問題。 我可能錯過了安裝/配置的東西嗎? 我不知道錯誤輸出有什么問題,這是我在jenkins盒子上得到的:
[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
這是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']);
};
你在Jenkins服務器上安裝了grunt嗎?
npm install grunt
你可以從jenkins管理界面設置一切,你不需要在本地安裝grunt :)
希望git / nodejs和grunt可供您使用
有關如何將grunt / node任務添加到jenkins作業的詳細信息,請參閱插件維基 - > https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin
這真的很容易:)
沒有ssh loggin只需要jenkins管理員權限
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.