英文:
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
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论