node.js - 安装 grunt - 是否安装?

标签 node.js gruntjs

我尝试使用 npm install grunt 安装 grunt,但我不清楚是否安装了 grunt:

$ npm install grunt
npm WARN deprecated <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fe2e6e1e6e2eefbece7cfbfa1bda1bebb" rel="noreferrer noopener nofollow">[email protected]</a>: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b4d9dddaddd9d5c0d7dcf4849a879a84" rel="noreferrer noopener nofollow">[email protected]</a>: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c5a2b7a4a6a0a3b0a9e8a3b685f4ebf7ebf6" rel="noreferrer noopener nofollow">[email protected]</a>: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d1a5b4bca1bdb0a5b491e1ffe1ffe0" rel="noreferrer noopener nofollow">[email protected]</a> No repository field.
npm WARN <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b5c1d0d8c5d9d4c1d0f5859b859b84" rel="noreferrer noopener nofollow">[email protected]</a> No license field.

例如

$ grunt
-bash: grunt: command not found

最佳答案

您已将其本地安装在运行安装命令的目录中。 您必须使用 -g 标志全局安装它。 在 grunt web 中,他们建议安装 grunt-cli。 npm install -g grunt-cli 根据您安装 Node 的方式,您可能需要将 sudo 添加到该命令中: sudo npm install -g grunt-cli

关于node.js - 安装 grunt - 是否安装?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41432023/

相关文章:

javascript - NodeJS 中的 worker 是什么

node.js - grunt 任务 uglify 错误 >> TypeError : Object #<Object> has no method 'isAbsolute'

twitter-bootstrap - Yeoman Web 应用程序生成器提供了错误的链接来查找 bootstrap glyphicon

javascript - Grunt Wiredep 不更新脚本标签

node.js - Sail.js如何做关联

javascript - Zapier Javascript : Unexpected token ] - working in IDE, Repl.it 和 Node v6.3.1

javascript - 对象 javascript 的条件

node.js - 在 Lambda 中使用异步

javascript - GruntJs 'grunt' cmd 打开 Visual Studio?

javascript - 硫化 polymer 一次性绑定(bind) src 属性