可以为节点应用程序安装所有缺少的模块吗? [英] Possible to install all missing modules for a node application?

查看:47
本文介绍了可以为节点应用程序安装所有缺少的模块吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个刚开始使用的节点应用程序,每次尝试运行它时,它都说缺少一个模块.我刚刚为每个模块使用 npm install ... 但在做了大约 10 个模块之后,我想知道是否有办法让 npm 为节点应用程序下拉所有需要的模块,而无需我手动安装每一个.可以吗?

I have a node app that I just started working with and each time I try to run it, it says there is a missing module. I've just been using npm install ... for each module but after doing about 10 of them I'm wondering if there is a way to have npm pull down all needed modules for a node app without me installing each one manually. Can it be done?

推荐答案

可以,只要 package.json 中列出了依赖项.

Yes, as long as the dependency is listed in package.json.

在包含package.json的目录下,输入:

In the directory that contains package.json, just type:

npm install

这篇关于可以为节点应用程序安装所有缺少的模块吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆