npm run build error
Julien-Marpault opened this issue · comments
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'.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(612,34)
TS1005: '?' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(613,17)
TS1005: ':' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(614,17)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(617,34)
TS1005: '?' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(618,17)
TS1005: ':' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(619,17)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(619,26)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(620,5)
TS1109: Expression expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(624,24)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(628,35)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(634,39)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(638,21)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,19)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,27)
TS1005: ':' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,36)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,55)
TS1005: '{' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,64)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(643,77)
TS1005: ',' expected.
ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts
[tsl] ERROR in C:\Azure DevOps\Extensions\MicrosoftSamples\node_modules@types\node\ts4.8\test.d.ts(647,22)
TS1005: ',' expected.
webpack 5.76.0 compiled with 20 errors in 7320 ms
(node:48316) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead)
(Use node --trace-deprecation ...
to show where the warning was created)
Remove "node" from the tsconfig.json types.
That way typescript wont look for node typings files.
Disclaimer, probably not the best solution, just a workaround.
"types": [ "react", "jest", "node" /* <-- Remove this */ ],