node.js node.js安装的节点文件夹放在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10095663/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 15:30:34  来源:igfitidea点击:

Where to put node folder for node.js install?

macosnode.jsinstall

提问by tarabyte

It's currently in the directory: /Users/myusername/node

它当前在目录中:/Users/myusername/node

but I feel like it should be closer to root? Maybe in /Developer? I'm having trouble finding an other advice online. I'm on macosx lion right now.

但我觉得它应该更接近root?也许在 /Developer 中?我在网上找不到其他建议。我现在在 macosx lion 上。

Thanks!

谢谢!

采纳答案by ekillaby

Since you're on Mac OS X you can use homebrew to manage the installation of a number of things that have recipes. Node.js is one of them.

由于您使用的是 Mac OS X,您可以使用自制软件来管理许多具有配方的东西的安装。Node.js 就是其中之一。

http://mxcl.github.com/homebrew/

http://mxcl.github.com/homebrew/

Once homebrew is installed and up to date you can simply run a command like the following.

安装自制软件并更新后,您只需运行如下命令即可。

brew install node.js

回答by munsellj

There is also now a Macintosh(or Windows) installer available for current releases(0.6.18 currently the latest at time of this writing). The universal .pkg installer will handle the everything for you so you don't need to worry about it :-)

现在还有一个 Macintosh(或 Windows)安装程序可用于当前版本(0.6.18 目前是撰写本文时的最新版本)。通用 .pkg 安装程序将为您处理一切,因此您无需担心:-)

If you want to know where the install ends up, I recently installed v0.6.17 on OSX Lion 10.7.4 and it looks like most of the files are under /usr/local/. Shell commands in /usr/local/bin/. Global node_modules and npm in /usr/local/lib/node_modules.

如果您想知道安装的结束位置,我最近在 OSX Lion 10.7.4 上安装了 v0.6.17,看起来大多数文件都在/usr/local/. 中的 Shell 命令/usr/local/bin/。全局 node_modules 和 npm in /usr/local/lib/node_modules.

Hope that helps!

希望有帮助!