简体   繁体   English

全局安装NodejS应用程序

[英]Install NodejS application Globally

It's really easy to install a Node module from NPM with: 使用以下方法从NPM安装Node模块确实很容易:

sudo npm install -g ModuleName

But how about doing the same from a Node application code that is on the same machine? 但是如何从同一台计算机上的Node应用程序代码中执行相同的操作呢?
How can it be installed globally? 如何在全球范围内安装? I want to be able to execute it without entering the full path and without publishing it to NPM. 我希望能够在不输入完整路径且不将其发布到NPM的情况下执行它。

Thanks Chad, that's correct. 谢谢乍得,这是正确的。 I can just go inside the application and run sudo npm install -g. 我可以进入应用程序并运行sudo npm install -g。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM