huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
45 stars 22 forks source link

Task crashes - Cannot find module 'tfsrestservice' #37

Closed dtzar closed 6 years ago

dtzar commented 6 years ago

Anytime I run the task it fails with the below. This used to work, so guessing your code update from a few hours ago broke it.

2017-11-27T20:29:14.2337630Z ==============================================================================
2017-11-27T20:29:14.2349750Z Task         : Trigger Build
2017-11-27T20:29:14.2365790Z Description  : This tasks allows to trigger a new Build (add it to the queue) as part of a Build Definition. It contains as well some conditions that can be applied, for example if the last build of certain definition was successful or not.
2017-11-27T20:29:14.2380520Z Version      : 2.4.1
2017-11-27T20:29:14.2394220Z Author       : Benjamin Huser
2017-11-27T20:29:14.2406040Z Help         : 
2017-11-27T20:29:14.2418130Z ==============================================================================
2017-11-27T20:29:14.4814830Z module.js:471
2017-11-27T20:29:14.4827020Z     throw err;
2017-11-27T20:29:14.4840080Z     ^
2017-11-27T20:29:14.4847020Z 
2017-11-27T20:29:14.4861650Z Error: Cannot find module 'tfsrestservice'
2017-11-27T20:29:14.4875880Z     at Function.Module._resolveFilename (module.js:469:15)
2017-11-27T20:29:14.4888640Z     at Function.Module._load (module.js:417:25)
2017-11-27T20:29:14.4903530Z     at Module.require (module.js:497:17)
2017-11-27T20:29:14.4917340Z     at require (internal/module.js:20:19)
2017-11-27T20:29:14.4932970Z     at Object.<anonymous> (/opt/vsts/work/_tasks/TriggerBuild_32abcf98-0df6-4711-b2e4-66a405d3c1a6/2.4.1/index.js:3:24)
2017-11-27T20:29:14.4947570Z     at Module._compile (module.js:570:32)
2017-11-27T20:29:14.4959660Z     at Object.Module._extensions..js (module.js:579:10)
2017-11-27T20:29:14.4972390Z     at Module.load (module.js:487:32)
2017-11-27T20:29:14.4987550Z     at tryModuleLoad (module.js:446:12)
2017-11-27T20:29:14.5000360Z     at Function.Module._load (module.js:438:3)
2017-11-27T20:29:14.6506930Z ##[error]Exit code 1 returned from process: file name '/home/vsts/agent/externals/node/bin/node', arguments '"/opt/vsts/work/_tasks/TriggerBuild_32abcf98-0df6-4711-b2e4-66a405d3c1a6/2.4.1/index.js"'.
huserben commented 6 years ago

Hi @dtzar

sorry about that, I did indeed fuck that one up. I changed some things within the extension manifest and did not revert it... Working on changing that asap and I should provide a fix soon...

Thanks for the feedback and sorry for the issues created

Edit: I updated the task and it should work now. Can you please verify this and let me know if it works or not.

silvath commented 6 years ago

I had the same problem. Its working for me now.

jamabrandao commented 6 years ago

Hi,

I still have the same problem. It's not working for me.

Edit: Task updated. It's working fine. Thanks for your support

dtzar commented 6 years ago

The fix worked for me - thanks for the quick turnaround!

huserben commented 6 years ago

Hi @silvath

which version is it using? 2.4.1 was the broken one, 2.4.2 should have fixed it (as it did for the others that posted here). Can you confirm its using the 2.4.2 version?

Edit: Sorry I didn't see your edit (it was early when i read it :-)).