How to offline my Node dependencies to deploy to Artifactory?

匆匆过客 提交于 2021-01-29 14:23:29

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/62927620/how-to-offline-my-node-dependencies-to-deploy-to-artifactory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!