npm - 在 Azure Devops 中使用缓存任务
问题描述
我在 Azure Devops 构建管道中使用缓存任务,因为我想缓存我的 NPM 包,这样就不必在每次运行构建时都下载它们。
要缓存我的解决方案的 node_modules 文件夹,我应该在路径输入中使用$(System.DefaultWorkingDirectory)/node_modules还是只使用 node_modules ?
解决方案
如果你想缓存 npm 的node_modules
,那么 path 的值应该是$(Pipeline.Workspace)/.npm/lib/node_modules
.
您可以单击此文档以获取详细信息。
推荐阅读
- r - 如何将 stat_poly_eq 标签放在构面图之外?
- python - ImportError:无法从“importlib”导入名称“元数据”
- gdb - 在 QNX gdb 上运行可执行文件而不重新上传它
- vue.js - Nuxt.js:如何从布局中引用页面数据?(例如,填充 og:title 标签)
- java - 以一个属性文件为前缀的批量弹簧属性值
- c# - 将 cygwin1.dll 加载到 C# - 访问冲突错误
- magento-1.9 - Magmi v0.7.22 导入而图像名称包括“fußballschuhe”“ß”消失在前面
- objective-c - 调用完成块时ObjectiveC崩溃
- java - 安装jdk的问题
- javascript - 如何使用 Node JS 从 json 中了解对象类型