gpt4 book ai didi

node.js - -bash : grunt: command not found - mac OSx

转载 作者:太空宇宙 更新时间:2023-11-04 02:48:16 25 4
gpt4 key购买 nike

我是个新手。这是我可以提供的信息,我可以提供需要的进一步信息。我已经记录了我所做的一切。 我学东西也很快。

我使用的是 MAC OSX El Capitan

我使用本教程作为我的指南(可能是我遇到问题的原因) https://changelog.com/posts/install-node-js-with-homebrew-on-os-x

我什至安装了 grunt

sudo npm install grunt -g

它甚至给了我这条路

/Users/<file path>/.node/bin/grunt -> /Users/<file path>/.node/lib/node_modules/grunt/bin/grunt

我也知道这和我的$PATH有关

PATH=/usr/local/share/npm/lib/node_modules/grunt-cli/bin:$PATH

看起来一切都安装正确。

当我运行时:

grunt

我得到:

-bash: grunt: command not found

如果我输入:

grunt -v

我得到:

bash: grunt: command not found

我什至来这里排除故障,但似乎没有任何效果。 http://gruntjs.com/getting-started

我在 stackoverflow 上查看了很多相关问题,但似乎没有一个能解决我的问题。

有没有办法重新安装所有内容并清除我计算机上的所有相关内容。

我还希望有一个可以在我的计算机上正常运行的示例,供新手学习。也许我不应该使用 Homebrew 程序来设置它。

非常感谢您的帮助。

最佳答案

-bash: grunt: command not found

上面的行告诉 grunt 没有安装在您的系统中。

您可以使用sudo npm install grunt -g安装grunt

在此之前,您已经在系统中安装了npm和nodejs,此链接 http://blog.teamtreehouse.com/install-node-js-npm-mac会有帮助的。

关于node.js - -bash : grunt: command not found - mac OSx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40884206/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com