首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“致命错误:找不到本地的咕噜声。”在Windows 7上

“致命错误:找不到本地的咕噜声。”在Windows 7上
EN

Stack Overflow用户
提问于 2013-08-04 03:47:30
回答 4查看 8K关注 0票数 5

我根本无法在Windows 7上工作。按照grunt网站(http://gruntjs.com/getting-started)上的说明,我已经运行了:

代码语言:javascript
复制
npm uninstall -g grunt-cli
npm uninstall grunt
npm uninstall -g grunt-init

git clone git@github.com:gruntjs/grunt-init-jquery.git c:/Users/me/.grunt-init/jquery

npm install -g grunt-cli
grunt-init jquery
npm install .

之后,运行"grunt“将产生以下输出:

代码语言:javascript
复制
grunt-cli: The grunt command line interface. (v0.1.9)

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

国家预防机制名单的产出如下:

代码语言:javascript
复制
npm WARN package.json consolidate@0.9.1 No repository field.
npm WARN package.json jquery-plugin@0.0.0-ignored No repository field.
npm WARN package.json passport-local-examples-login@0.0.0 No repository field.
npm WARN package.json receiptly@0.0.1 No repository field.
npm WARN package.json cookie-signature@1.0.1 No repository field.
npm WARN package.json fresh@0.1.0 No repository field.
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json range-parser@0.0.4 No repository field.
npm WARN package.json send@0.1.0 No repository field.
npm WARN package.json pause@0.0.1 No repository field.
npm WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json eyes@0.1.8 No repository field.
npm WARN package.json bytes@0.2.0 No repository field.
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json uid2@0.0.2 No repository field.
C:\Users\me\AppData\Roaming\npm
└─┬ grunt-init@0.2.1
  └── grunt@0.4.1

在当前目录中运行“”在运行grunt时会出现同样的错误。

有什么想法吗?我的理解是,grunt-cli是为了寻找一个本地的grunt安装,但我不知道为什么它找不到它。

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2015-04-09 19:20:20

我知道这个问题问了两年了。然而,如果有人想在未来:

我也有同样的问题。我通过在本地安装grunt 来修复这个问题。根据咕噜的站点

请注意,安装grunt-cli并不安装Grunt任务运行程序!Gruntfile的工作很简单:运行安装在Gruntfile旁边的Grunt版本。这允许Grunt的多个版本同时安装在同一台计算机上。

所以我刚在本地安装了Grunt。

代码语言:javascript
复制
npm install grunt --save-dev

-保存:将它添加到您的package.json中

-dev:将其添加为一个dev依赖项。

票数 5
EN

Stack Overflow用户

发布于 2013-08-04 07:00:19

在您运行命令的目录中必须有一个Gruntfile.js。另外,请再次检查“”实际上给了您一个node_modules目录,其中有一个名为grunt的子目录。

票数 3
EN

Stack Overflow用户

发布于 2015-06-23 07:02:11

您应该在GUI模式下安装grunt

打开node.js cmd提示符,然后打开根文件夹并运行以下命令

  1. npm install (一旦完成,您就可以在根文件夹中看到node_modules文件夹)
  2. npm install –g grunt-cli (将版本从("version": "minified" )更改为Current release("version":"1.11");运行生成后,应该用小型化替换)
  3. grunt build:full

注意:当第一次运行grunt时,版本必须更改。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18039546

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档