huserben / TfsExtensions

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

Error: Cannot find module 'tfsrestservice' #66

Closed silvath closed 6 years ago

silvath commented 6 years ago

Hi,

I think that something may be incorrect in this latest version 2.8.1.

2018-04-16T18:30:05.6920343Z ##[section]Starting: PowerPlanning 2018-04-16T18:30:05.7140599Z ============================================================================== 2018-04-16T18:30:05.7140599Z Task : Trigger Build 2018-04-16T18:30:05.7150356Z 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. 2018-04-16T18:30:05.7150356Z Version : 2.8.1 2018-04-16T18:30:05.7150356Z Author : Benjamin Huser 2018-04-16T18:30:05.7150356Z Help : 2018-04-16T18:30:05.7150356Z ============================================================================== 2018-04-16T18:30:06.0500384Z module.js:471 2018-04-16T18:30:06.0510365Z throw err; 2018-04-16T18:30:06.0520315Z ^ 2018-04-16T18:30:06.0550304Z 2018-04-16T18:30:06.0600336Z Error: Cannot find module 'tfsrestservice' 2018-04-16T18:30:06.0600336Z at Function.Module._resolveFilename (module.js:469:15) 2018-04-16T18:30:06.0600336Z at Function.Module._load (module.js:417:25) 2018-04-16T18:30:06.0660377Z at Module.require (module.js:497:17) 2018-04-16T18:30:06.0660377Z at require (internal/module.js:20:19) 2018-04-16T18:30:06.0670391Z at Object. (C:\vsts\agent\powerplanning_work_tasks\TriggerBuild_32abcf98-0df6-4711-b2e4-66a405d3c1a6\2.8.1\index.js:3:24) 2018-04-16T18:30:06.0670391Z at Module._compile (module.js:570:32) 2018-04-16T18:30:06.0670391Z at Object.Module._extensions..js (module.js:579:10) 2018-04-16T18:30:06.0670391Z at Module.load (module.js:487:32) 2018-04-16T18:30:06.0670391Z at tryModuleLoad (module.js:446:12) 2018-04-16T18:30:06.0670391Z at Function.Module._load (module.js:438:3) 2018-04-16T18:30:06.1670436Z ##[error]Exit code 1 returned from process: file name 'C:\vsts\agent\powerplanning\externals\node\bin\node.exe', arguments '"C:\vsts\agent\powerplanning_work_tasks\TriggerBuild_32abcf98-0df6-4711-b2e4-66a405d3c1a6\2.8.1\index.js"'. 2018-04-16T18:30:06.1720386Z ##[section]Finishing: PowerPlanning

burndeal commented 6 years ago

I'm seeing this issue as well.

huserben commented 6 years ago

Sorry Guys, seems like something went wrong when packaging. I hope it didn't cause too many problems for you.

Version 2.8.2 which should fix the issue is uploaded now.

Could one of you quickly test and confirm that it's working again?

silvath commented 6 years ago

Ben,

My build is still using the version 2.8.1. I will wait half a hour and try again.

Thiago

cdacamar commented 6 years ago

I'm seeing this as well. Will update once fix has propagated.

sackum commented 6 years ago

I am also facing it. I do see 2.8.2 in marketplace but my build is still using 2.8.1 and failing. Any idea how long it would take to propagate these changes?

silvath commented 6 years ago

My builds still using 2.8.1 too.

huserben commented 6 years ago

I'm sorry but I don't know when VSTS is updating the extension or how to force an update of it.

huserben commented 6 years ago

Hmm so did it finally update for you or are you still stuck with 2.8.1?

tijntje commented 6 years ago

still same problem here:

2018-04-17T06:05:26.5229594Z Version : 2.8.1

cdacamar commented 6 years ago

Mine is still on 2.8.1. Is there any possibility that after 2.8.2 there can be a major version bump? VSTS only allows us to lock versions on major releases (ie. 2.) so once it's stable on 2. it would be a major help to our team to have that version be locked.

sackum commented 6 years ago

we are also stuck at 2.8.1, It would be a great help to us too to have 2.8.2 locked and major version bump after it. However we are still waiting for 2.8.2 to unblock our builds.

torgeirhansen commented 6 years ago

It's a pretty big wrench in the gears then our build and deploy pipeline just dies 😱😭

huserben commented 6 years ago

I think I found the issue and I'm working on an update...Sorry again for the issues caused by the 2.8.1 version.

huserben commented 6 years ago

I uploaded version 2.8.3. Please let me know if it now updated and works again.

torgeirhansen commented 6 years ago

It seems to work now, thanks for the quick fix! :)

huserben commented 6 years ago

Ok very good. I'll wait for some others to confirm it's solved before closing the issue.

Sorry for all that mess - I'm trying to look into the packaging process and see if I can add some measures in order to prevent this fiasco from happening again.

I hope you were not blocked too much because of me.

torgeirhansen commented 6 years ago

No worries, I just had to manually trigger some builds to get my code through the pipeline :)

As to why this isn't a built-in function within TFS/VSTS is beyond me (or alternatively, which in my case would be a better option: have release-triggers that only trigger a release when all artifact sources have been updated [and are based on the same commit-id]).

cdacamar commented 6 years ago

It appears to be working on our end :+1:

silvath commented 6 years ago

Its working. Tks Ben

sackum commented 6 years ago

working at our end. Thanks for the help Ben!

sackum commented 6 years ago

Hi Ben, I noticed one small thing. marketplace shows 2.8.3 is the latest version but our build task is showing 2.8.2. It's working so no issues there, it's just version mismatch in market place and VSTS builds. I wanted to bring it to your attention so that you can try to fix it with your future changes.

PS: Not sure if we need to wait to get 2.8.3 though. Thanks!

MarketPlace: Version 2.8.3
Last updated ‎4‎/‎17‎/‎2018‎ ‎12‎:‎58‎:‎32‎ ‎AM
Publisher Benj Huser

Build Logs: 2018-04-17T08:20:32.5983706Z ============================================================================== 2018-04-17T08:20:32.5983706Z Task : Trigger Build 2018-04-17T08:20:32.5983706Z 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. 2018-04-17T08:20:32.5983706Z Version : 2.8.2 2018-04-17T08:20:32.5983706Z Author : Benjamin Huser 2018-04-17T08:20:32.5983706Z Help : 2018-04-17T08:20:32.5983706Z ==============================================================================

huserben commented 6 years ago

@sackum Yes I'm aware of that fact and I'll align it the next time I will update the task.