问题描述
我正在学习 hybris 并开始使用 smartedit。问题是当我运行 ant clean all
或 ant updatesystem
时,我收到此错误。
Running grunt default
grunt-cli: The grunt command line interface (v1.3.2)
Fatal error: Unable to find local grunt.
If you're seeing this message,grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,please see the Getting Started guide:
https://gruntjs.com/getting-started
到现在为止我做了什么:
我在全局安装了 grunt-cli,在本地安装了 grunt。另外,我运行 npm install
。
这是我的 packege.json 文件:
{
"name": "name","version": "1.0.0","main": "index.js","directories": {
"lib": "lib"
},"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},"author": "","license": "ISC","devDependencies": {
"grunt": "^1.4.1","grunt-contrib-jshint": "^3.0.0","grunt-contrib-watch": "^1.1.0"
},"dependencies": {},"description": "desc"
}
这是我的 Gruntfile.js:
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['Gruntfile.js','src/**/*.js','test/**/*.js'],options: {
globals: {
jQuery: true
}
}
},watch: {
files: ['<%= jshint.files %>'],tasks: ['jshint']
}
});
grunt.loadNpmtasks('grunt-contrib-jshint');
grunt.loadNpmtasks('grunt-contrib-watch');
grunt.registerTask('default',['jshint']);
};
我尝试了很多方法来解决这个问题,但似乎没有任何效果。有人可以帮我吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)