Skip to content
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

npm run build error #131

Open
Julien-Marpault opened this issue Mar 9, 2023 · 1 comment
Open

npm run build error #131

Julien-Marpault opened this issue Mar 9, 2023 · 1 comment

Comments

@Julien-Marpault
Copy link

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)

@mathieu-fournier
Copy link

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 */ ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants