如何使我的Node依赖项脱机以部署到Artifactory? [英] How to offline my Node dependencies to deploy to Artifactory?

查看:65
本文介绍了如何使我的Node依赖项脱机以部署到Artifactory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Artifactory服务器,该服务器未连接到互联网,也无法连接.我有一个React项目,我需要能够使用上述Artifactory服务器进行构建.如何下载/打包/压缩所有项目依赖项并将其部署到Artifactory?

I have an Artifactory server that is not connected to the internet and can't be. I have a React project that I need to be able to build using said Artifactory server. How can I download/pack/tar all of my project dependencies and deploy them to Artifactory?

推荐答案

您必须具有Internet连接才能检索节点模块依赖项.完成后,您可以列出所有软件包及其解析的网址

you must have an internet connection to retrieve the node modules dependencies. once done, you can list all packages and their resolved url

find node_modules \
  -type f \
  -name package.json \
  -exec jq -r '._resolved' {} \; \
  | sort \
  | uniq

然后下载每个文件并将其上传到工件

then download each of which and upload it to artifactory

这篇关于如何使我的Node依赖项脱机以部署到Artifactory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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