-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WikiUpdaterTask@2 - Cannot find module 'node:events' #1870
Comments
Can I confirm where you are trying to run this task - is it the AZDO Services (Cloud) or a Server (On premised). If the latter which version of AZDO Server are you using. Also are you using Microsoft Host Build agents or private agents? I have not experienced with error in either my automated testing, or in any of the pipelines I use which all make use of this task The change to the code around the 10th Apr was to fix a regression a previous update had cause. You can see the shipped versions and download VSIX for use on on premise AZDO Server instances |
The installation of the VSIX is done automatically by AZDO as part of the running of a pipeline for minor or patch updates (using semver format MAJOR.MINOR.PATCH). So you only have to alter your pipeline to change the major version. So the question has to be what is the difference in setup on the 2 failing server? Do they have different versions of Node installed? |
As it was wrote in description, there is no any Node installed on any of these servers and it still works of 5 others Servers. I agree that 2 failing servers should have something different, but can"t find what it can be. And before last update of the Task, it worked on all of these Servers. |
Same problem for us with version 2.14.4. Also on-prem, Azure DevOps Server 2022.0.1. |
Node is installed on an agent when the Azure DevOps agent is installed. The version of Node is dependant on the version of the Azure DevOps agent. If you look your agent's external folder you (amongst other folders) will see some of
Is it possible you have different agent versions on different VMs? (Though this seems unlikely as the agent binaries are managed by the Azure DevOps Server) |
Ok, I thought that the Task would use any of the node versions available in "..\work\_tool\node" folder? In the externals folder we only have "node" and "node10", so would that perhaps explain the issue in our case? |
In the version of node to be used depends on the At the end of the file you will find the execution block that defines the Node version to use For the 3.x WikiUpdater task it contains
For the 2.*
Note for some tasks there could be multiple execution blocks supporting Node, Node10, Node16 and various PowerShell options - it depends what is packaged in the task |
We had an old version of the release pipeline agent, updating that and using latest version of the task worked. Thank you! |
Azure DevOps Extensions
WIKI Updater
Platform
Azure DevOps Services
Azure DevOps Server (TFS) Version
Windows Server 2016 Standard
Extension Version
2.14.4 (3.23.6)
Describe the bug
After 10 April 2024, when WIKI Updater Tasks extension was updated to version 3.23.6, the task started to fail on some environments.
The google search for error: Cannot find module 'node:events', give something about node.js, but node.js is not installed on others environments and it still works, but on some particulars environments it fails with the same script executed.
Please advise.
Repo Steps
steps:
displayName: 'Update Wiki Release notes - ${{ parameters.currentDate }}'
inputs:
repo: 'https://xxx/yyy/_git/Release-Notes.wiki'
branch: 'master'
filename: '${{ parameters.wikiFileName }}'
replaceFile: '${{ parameters.wikiReplaceFile }}'
appendToFile: '!${{ parameters.wikiReplaceFile }}'
dataIsFile: true
sourceFile: '${{ parameters.outputFileName }}'
message: '${{ parameters.wikiCommitMessage }} - ${{ parameters.currentDate }}'
gitname: 'user'
gitemail: 'user@yahoo.com'
useAgentToken: true
localpath: '${{ parameters.LocalPath }}'
Expected Behavior
No response
Logging Information
Starting: Update Wiki Release notes - 2024-05-01T15:39:48
Task : Git based WIKI Single File Updater from Black Marble
Description : A tools to update or create a file in a WIKI based in a Git repo
Version : 2.14.4
Author : Richard Fennell
Help : Version: #{Build.BuildNumber}#. More Information
##[error]Unhandled: Cannot find module 'node:events'
##[error]Error: Cannot find module 'node:events'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at src/lib/plugins/plugin-store.ts (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:1465:26)
at __init (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:26:56)
at src/lib/plugins/index.ts (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:1628:5)
at __init (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:26:56)
at src/lib/git-factory.ts (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:4754:5)
at __init (C:\azagent\A3_work_tasks\WikiUpdaterTask_e59c5ae6-3afd-479d-bc40-81cd6c541840\2.14.4\node_modules\simple-git\dist\cjs\index.js:26:56)
Finishing: Update Wiki Release notes - 2024-05-01T15:39:48
The text was updated successfully, but these errors were encountered: