【发布时间】:2013-03-07 04:44:16
【问题描述】:
我使用以下命令卸载了 grunt。
npm uninstall -g grunt
然后我再次使用以下命令安装了 grunt。
npm install -g grunt-cli
访问以下链接: https://npmjs.org/package/grunt-html
我想用上面的 grunt 插件
但是当我运行 grunt 命令时,它给了我以下错误:
D:\nodeJS\node_modules\grunt-html>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
【问题讨论】:
-
我不明白这与 jQuery 有什么关系。您必须在项目目录中安装 grunt,正如文档中所述:gruntjs.com/getting-started#installing-grunt-and-gruntplugins。错误消息还显示:“[...] 或 grunt 尚未安装到您的项目本地。”.
-
我在我的项目目录中成功安装了 grunt。现在我该如何使用那个插件
-
您安装插件并按照其项目页面(您链接到的页面)上的说明进行操作。
-
stackoverflow.com/questions/13925916/… ,这可能会有所帮助