How can I use the npm packages from feed in my VSTS task? As I want to use the cached packages in my build.
Asked
Active
Viewed 540 times
1 Answers
1
If the packages are in your VSTS feed, the simple way is choose corresponding feed in npm task:
- Add npm task (Command:
install
; Working folder with package.json:[package.json folder path]
) - Choose Registry I select here
- Choose your feed
Otherwise, just add npm task (Command: install; Working folder with package.json: [package.json folder path]

starian chen-MSFT
- 33,174
- 2
- 29
- 53
-
There is no registry choose option in VSTS npm task. Can you share the screenshot? – Twinkle Feb 16 '18 at 08:54
-
@Twinkle Do you use 0.* version of npm task? Change it to 1.* version and expend Custom registries and authentication section. – starian chen-MSFT Feb 19 '18 at 01:31
-
Thanks. Let me check this. :) :) – Twinkle Feb 19 '18 at 08:23
-
@Twinkle What's the result now? I added the screenshot to the answer. – starian chen-MSFT Feb 20 '18 at 05:40
-
Thanks a lot !! It worked. Actually, I want to reduce my build runtime. Without this npm install task takes 3 mins to run And with this, it is taking more than 4 mins to run. So, Now It is not useful for me. But Thanks again. If you have some idea of reducing the build runtime you can share . :) :) – Twinkle Feb 21 '18 at 08:12
-
@Twinkle With private agent, you can retrieve the packages from cache. – starian chen-MSFT Feb 22 '18 at 01:19