microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build issue when running 'npm run build'

zubinix opened this issue · comments

Hi

Does anyone know the cause of this:

> azure-devops-extension-sample@1.0.3 package-extension C:\Users\zubin\source\repos\azure-devops-extension-sample
> tfx extension create --manifest-globs azure-devops-extension.json src/Samples/**/*.json "--rev-version"

(node:6440) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
TFS Cross Platform Command Line Interface v0.6.3
Copyright Microsoft Corporation
error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Inplace
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! azure-devops-extension-sample@1.0.3 package-extension: `tfx extension create --manifest-globs azure-devops-extension.json src/Samples/**/*.json "--rev-version"`
npm ERR! Exit status 4294967295

Seems to be a problem with running tfx extension create

Yes, I have met this also. In my opinion, TFX is not compatible with the latest version of Node. For now, I solved this by reverting Node to 12.20.0.
It seems that TFX is replaced by this https://github.com/Azure/azure-devops-cli-extension and no one updated this sample.

Thanks @karelkral. Built successfully after switching to Node 12.20.0

Thanks @karelkral!
Reverting back to Node v13.14.0 worked for me as well.

The good news is that this bug is fixed in latest tfx-cli. So update your tfx-cli dependency in package.json and you can run on the latest Node.
"tfx-cli": "^0.10.0"
and then run npm install