简体   繁体   English

我可以在没有互联网的情况下安装快递吗?

[英]Can I install express without Internet access?

I have node.js installed in my work machine and I want to experiment with express, but seems like internet access is blocked from the console (I'm using windows BTW). 我在工作机中安装了node.js,我想尝试一下Express,但似乎从控制台阻止了Internet访问(我正在使用Windows BTW)。

Is there a way to download the express package and use a command for npm to install it from a local folder instead of internet? 有没有办法下载Express软件包并使用npm命令从本地文件夹而不是Internet安装它?

As docs says, you can. 正如文档所说,您可以。 You need npm install <tarball file> : 您需要npm install <tarball file>

Install a package that is sitting on the filesystem. 安装位于文件系统上的软件包。 Note: if you just want to link a dev directory into your npm root, you can do this more easily by using npm link . 注意:如果您只想将dev目录链接到npm根目录,则可以使用npm link来更轻松地做到这一点。

Example: 例:

npm install ./package.tgz

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

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