有人可以帮我解决这个问题吗?致命错误:无法找到本地 grunt

问题描述

我正在学习 hybris 并开始使用 smartedit。问题是当我运行 ant clean allant 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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...