如何在断开连接的计算机上安装npm模块,确保所有依赖关系



我需要在断开连接的计算机网络上工作(无法访问互联网),我希望使用jsbin进行SharePoint/Windows开发,强烈建议安装npm,以确保所有依赖项都存在。

有没有一种方法可以在连接的计算机上运行npm,然后将一个或多个文件夹复制到目标网络,从而在具有NodeJS的另一台计算机上安装模块,无论是否使用npm(?)

我看到了对npm包的引用,但我对此还不够熟悉(并且主要来自Windows环境),这对我来说没有太大意义

我刚刚用grunt cli(另一个全局安装的包)对它进行了测试。

# do this on connected computer
npm install -g jsbin
npm pack jsbin
# this will drop a jsbin-[version number].tgz in the cwd
# move this file to new computer and…
# do this on not-connected computer
npm install -g jsbin-[version number].tgz

相关内容

最新更新