question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript errors when running tsc

See original GitHub issue

Hi, when runningtsc with skipLibCheck: false the compiler runs into these errors:

node_modules/@linear/sdk/dist/graphql-client.d.ts:26:40 - error TS2304: Cannot find name 'RequestInit'.

26     constructor(url: string, options?: RequestInit);
                                          ~~~~~~~~~~~

node_modules/@linear/sdk/dist/graphql-client.d.ts:27:120 - error TS2304: Cannot find name 'RequestInit'.

27     rawRequest<Data, Variables extends Record<string, unknown>>(query: string, variables?: Variables, requestHeaders?: RequestInit["headers"]): Promise<LinearRawResponse<Data>>;
                                                                                                                          ~~~~~~~~~~~

node_modules/@linear/sdk/dist/graphql-client.d.ts:31:135 - error TS2304: Cannot find name 'RequestInit'.

31     request<Data, Variables extends Record<string, unknown>>(document: DocumentNode | string, variables?: Variables, requestHeaders?: RequestInit["headers"]): Promise<Data>;
                                                                                                                                         ~~~~~~~~~~~

node_modules/@linear/sdk/dist/graphql-client.d.ts:32:25 - error TS2304: Cannot find name 'RequestInit'.

32     setHeaders(headers: RequestInit["headers"]): LinearGraphQLClient;
                           ~~~~~~~~~~~

node_modules/@linear/sdk/dist/types.d.ts:4:46 - error TS2304: Cannot find name 'RequestInit'.

4 export interface LinearClientOptions extends RequestInit {
                                               ~~~~~~~~~~~

node_modules/@linear/sdk/dist/types.d.ts:15:52 - error TS2304: Cannot find name 'RequestInit'.

15 export interface LinearClientParsedOptions extends RequestInit {
                                                      ~~~~~~~~~~~

node_modules/@linear/sdk/dist/types.d.ts:28:15 - error TS2304: Cannot find name 'Headers'.

28     headers?: Headers;
                 ~~~~~~~

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjkrascommented, Apr 26, 2021

Perfect, thanks

1reaction
eldhcommented, Apr 14, 2021

Thanks for the report. We’ll fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript - error when running tsc command for express server
I wanted to know a bit more about typescript and wanted to do a small project with it. I'm running into an error...
Read more >
tsc command not found TypeScript error [Solved] | bobbyhadz
To solve the error "tsc: command not found", install the typescript package globally by running npm install typescript@latest -g or use the npx...
Read more >
Avoid TypeScript errors in your project by using the TypeScript ...
Open the command palette (Cmd+Shift+P) or (Ctrl+Shift+P) . · Select Tasks: Configure Task . · Select tsc: watch - tsconfig.json · Make sure...
Read more >
This is not the tsc command you are looking for #44843 - GitHub
I need to first run npx -p typescript that log me in new shell after that tsc -w works.. otherwise its the same...
Read more >
Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found