默认的节点模块存储在哪里

huangapple go评论68阅读模式
英文:

Where are the default node modules stored

问题

我想知道默认的Node.js模块在Mac上存储在哪里,比如fs、stream、path等等。我尝试查看我的/usr文件夹,但找不到任何内容。欢迎任何帮助。

英文:

I was wondering where the default node.js modules are stored on a mac, such as fs, stream, path, etc. I tried looking into my /usr folder, but I couldn't find anything. Any help is welcome.

答案1

得分: 0

你可以尝试使用 npm list -g 命令,该命令会列出全局安装的包及其路径。

英文:

You can try npm list -g this command will list globally installed packages with their path.

答案2

得分: 0

The terminal command to find the root location (where global modules are installed) is:

npm root -g

In a Mac, it should be /usr/local/lib/node_modules.

英文:

The terminal command to find the root location (where global modules are installed) is:

npm root -g

In a Mac, it should be /usr/local/lib/node_modules.

huangapple
  • 本文由 发表于 2023年7月13日 10:54:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76675595.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定