Closed gtarunr closed 6 years ago
Hi @gtarunr
this seems like an outdated version of node.js is used. Are you able to update your agent via TFS. Can you check the version of node that you have installed on the agent?
Usually this is somewhere in the following directory: Agent\externals\node\bin\node.exe You can get the version by invoking the node.exe with the parameter --version over the commandline.
Hello @huserben
Thank you for looking into the issue.
I had downloaded the TFS 2015 Build Agent , which is usually located at the TFS URL location. For Example: URL Template: <http/https>:
Regarding, the node installation and version details. I had followed the instructions provided in the below link: http://blog.teamtreehouse.com/install-node-js-npm-windows
I had run the command to check the node version which you had mentioned above. My Node version is as below: C:\Windows\system32>node --version v9.8.0
Please let me know if you may need any further information on the same. Looking Forward for your assistance. Thank you.
Hi
so the import thing is that you not only have to install the version, but you need to put it in the directory the agent uses. Normally this is, I believe, C:\Agent\externals\node\bin\
So in there is the node.exe the agent uses. If you installed a new version, you need to replace this node.exe with the new one you probalby put under Program Files somewhere.
Could you try this out please?
I currently have access to github only by phone, so my ability to help is a bit limited, sorry for that.
Hello @huserben
No Worries. I presume your assistance here would be helpful.
As mentioned earlier i had followed the below link below to install the node js: http://blog.teamtreehouse.com/install-node-js-npm-windows
Which had by default placed the node.exe at the below location: "C:\Program Files\nodejs\node.exe"
Regarding the agent location which you had provided above. I am not able to find the location "C:\Agent\externals\" to place the node.exe.
Below are the folders available at the directory structure of the tfs build agent installed which is at "C:\agent\" _work Agent tasks
And under Agent folder above there is Worker
Under Worker there are de es fr Handlers it ja ko Modules Plugins ru Tools tr zh-Hans zh-Hant
dll's, exe's config's etc.. files at the above locations.
Please let me know for any further information. Thank you.
ok, there might be a difference in the structure due to the different version. Could you just search below the agend folder for node.exe via the built-in search maybe?
I was able to locate the node.exe at the agent folder. Which is as below: "C:\agent\Agent\Worker\Handlers\Node\node.exe"
Ok. So now please try to replace this node.exe with the one under program files. You can just do this via copy & paste. Ideally you rename the existing node.exe first so you can always go back to the original state.
Then try to run the task again.
I had replaced the node.exe from the agent folder to the program files folder at the node location. I had also took the backup of the earlier node.exe. Trigger a new build still the below exception persists:
:
Also, i had a chance to run the npm command from command line to check if the npm is working below is the exception. Where as with the earlier node.exe it was working fine:
C:\Windows\system32>npm
C:\Program Files\nodejs\node_modules\npm\lib\utils\unsupported.js:28
console.error(a bug known to break npm. Please update to at least ${r ^ SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:19:21 at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:92:3) at Module._compile (module.js:460:26) C:\Program Files\nodejs\node_modules\npm\lib\utils\unsupported.js:28 console.error(
a bug known to break npm. Please update to at least ${r
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:19:21
at Object.
Hello @huserben
Was able to fix the issue by copying the node.exe the other way round which is from the program files node directory to the agent node.exe directory. Now i am able to chain the builds. Thank you very much for the assistance and thank you for designing this tool.
Hi @gtarunr
ok, I'm glad to hear that it could be resolved. Thank you for your input, I will as a consequence leave this issue open until I updated the documentation so the information is provided to everybody using TFS 2015.
If you have any other issues or suggestions for improvements, please don't hesitate to open another issue.
The newest version contains a quick statement on the marketplace page which says that some specialities apply for TFS 2015 users. That links to https://github.com/huserben/TfsExtensions/blob/master/BuildTasks/Tfs15.md which includes a short guide on how to update the agent node version.
Hello There,
I have installed this plugin extension in TFS and was able to add a Task for Trigger Build Task Successfully so that i can trigger another builds or chain the builds. But during compilation on my windows machine i am receiving the below exception: