We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I installed got@12 as devDependencies for benchmark test and not use in source directory (src) I guess some tools use it when i run npm run build
npm run build
when i use typescript to compile the project, transpilation errors raised due to got. Errors are as follow:
node_modules/got/dist/source/core/index.d.ts:15:24 - error TS1005: ',' expected. 15 import Options, { type NativeRequestOptions } from './options.js'; ~~~~~~~~~~~~~~~~~~~~ node_modules/got/dist/source/core/index.d.ts:16:15 - error TS1005: ',' expected. 16 import { type PlainResponse, type Response } from './response.js'; ~~~~~~~~~~~~~ node_modules/got/dist/source/core/index.d.ts:16:35 - error TS1005: ',' expected. 16 import { type PlainResponse, type Response } from './response.js'; ~~~~~~~~ node_modules/got/dist/source/core/options.d.ts:21:29 - error TS1005: ',' expected. 21 import http2wrapper, { type ClientHttp2Session } from 'http2-wrapper';
I solved it by downgrading Got to 11.x.x. Because version 11.x.x has no import type syntax.
import type
I'm confused about whether this is a got problem or a typescript problem
tsconfig.json
{ "compilerOptions": { "target": "es5", "outDir": "./lib", "skipLibCheck": true }, "include": ["src/**/*", "./types/*.d.ts"], }
The text was updated successfully, but these errors were encountered:
Duplicate of #2129
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Actual behavior
I installed got@12 as devDependencies for benchmark test and not use in source directory (src)
I guess some tools use it when i run
npm run build
when i use typescript to compile the project, transpilation errors raised due to got. Errors are as follow:
I solved it by downgrading Got to 11.x.x. Because version 11.x.x has no
import type
syntax.Expected behavior
I'm confused about whether this is a got problem or a typescript problem
Code to reproduce
tsconfig.json
Checklist
The text was updated successfully, but these errors were encountered: