microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps
MIT License
235 stars 154 forks source link

npm run build error #132

Open Julien-Marpault opened 1 year ago

Julien-Marpault commented 1 year ago

ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\src\Samples\WorkItemOpen\WorkItemOpen.tsx ./src/Samples/WorkItemOpen/WorkItemOpen.tsx [tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\src\Samples\WorkItemOpen\WorkItemOpen.tsx(44,104) TS2322: Type 'ObservableValue' is not assignable to type 'string | IReadonlyObservableValue<string | undefined> | undefined'. Type 'ObservableValue' is not assignable to type 'IReadonlyObservableValue<string | undefined>'. The types returned by 'subscribe(...)' are incompatible between these types. Type '(value: string, action?: string | undefined) => void' is not assignable to type '(value: string | undefined, action?: string | undefined) => void'. Types of parameters 'value' and 'value' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'.

webpack 5.76.0 compiled with 1 error in 6853 ms (node:44748) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead) (Use node --trace-deprecation ... to show where the warning was created)

karelkral commented 1 year ago

As I remember, I had to turn off strictFunctionTypes, as seen bellow. Just try to turn off strictFunctionTypes in tsconfig.json

jumorelle commented 1 year ago

Hi, this works for me. But why MS doesn't put the ui sdk on github ?! Do you know how to open issues on the azure-devops-ui library ? Because this shouldn't been reported here.

karelkral commented 1 year ago

There is not any support for ui SDK, forums, or issues. Terrible.