-
-
Notifications
You must be signed in to change notification settings - Fork 529
after upgrade from 0.8.2 to 0.9.1, receiving several errors all inside openapi-fetch #1549
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
Comments
I'm getting the same errors, using |
Strange—those issues don’t appear anywhere in the project itself which is a pnpm monorepo (even installing from npm). Will try and reproduce manually, then see if there’s just something off with the TypeScript configuration in this project not catching these for some reason. Just out of curiosity, are people with this error using ESM ( |
so, all I did on that was just upgrade openapi-fetch .. package.json: {
"name": "grocy-micro-ui",
"description": "Micro UI for Grocy",
"version": "0.0.0",
"homepage": "",
"private": true,
"keywords": [
"feathers"
],
"author": {},
"contributors": [],
"bugs": {},
"engines": {
"node": ">= 20.10.0"
},
"feathers": {
"language": "ts",
"packager": "npm",
"database": "sqlite",
"framework": "koa",
"transports": [
"rest",
"websockets"
],
"schema": "typebox"
},
"directories": {
"lib": "src",
"test": "test"
},
"files": [
"lib/client.js",
"lib/**/*.d.ts",
"lib/**/*.shared.js"
],
"main": "lib/client",
"scripts": {
"build:openapi": "npx openapi-typescript src/grocyApi/grocyApiV4.spec.json -o src/grocyApi/grocyApiV4.d.ts && npm run bundle:client",
"bundle:client": "npm run compile && npm pack --pack-destination ./public && cd public && npm install grocy-micro-ui-0.0.0.tgz --legacy-peer-deps",
"compile": "shx rm -rf lib/ && tsc",
"dev": "cross-env NODE_ENV=development nodemon -x ts-node src/index.ts",
"start": "cross-env NODE_ENV=production node lib/",
"mocha": "cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit",
"test": "cross-env NODE_ENV=test npm run migrate && npm run mocha",
"migrate": "knex migrate:latest",
"migrate:make": "knex migrate:make",
"upgrade-deps": "npx npm-check-updates -u --doctor"
},
"dependencies": {
"@feathersjs/adapter-commons": "^5.0.22",
"@feathersjs/authentication": "^5.0.22",
"@feathersjs/authentication-client": "^5.0.22",
"@feathersjs/authentication-local": "^5.0.22",
"@feathersjs/authentication-oauth": "^5.0.22",
"@feathersjs/configuration": "^5.0.22",
"@feathersjs/errors": "^5.0.22",
"@feathersjs/feathers": "^5.0.22",
"@feathersjs/knex": "^5.0.22",
"@feathersjs/koa": "^5.0.22",
"@feathersjs/schema": "^5.0.22",
"@feathersjs/socketio": "^5.0.22",
"@feathersjs/transport-commons": "^5.0.22",
"@feathersjs/typebox": "^5.0.22",
"cross-env": "^7.0.3",
"knex": "^3.1.0",
"openapi-fetch": "^0.8.2",
"sqlite3": "^5.1.7",
"winston": "^3.11.0"
},
"devDependencies": {
"@feathersjs/cli": "^5.0.22",
"@feathersjs/rest-client": "^5.0.22",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.19",
"axios": "^1.6.7",
"mocha": "^10.3.0",
"nodemon": "^3.0.3",
"openapi-typescript": "^6.7.4",
"prettier": "^3.2.5",
"shx": "^0.3.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
} I see there's a 0.9.2 now, going to give it a look Looks like it's the same output G:\grocy-micro-ui>npm run compile
[email protected] compile
shx rm -rf lib/ && tsc
node_modules/openapi-fetch/dist/index.d.ts:83:42 - error TS2314: Generic type 'FetchOptions' requires 1 type argument(s).
83 export type ParseAsResponse<T, O extends FetchOptions> = O extends {
~~~~~~~~~~~~
node_modules/openapi-fetch/dist/index.d.ts:119:40 - error TS2314: Generic type 'FetchOptions' requires 1 type argument(s).
119 export type FetchResponse<T, O extends FetchOptions> =
~~~~~~~~~~~~
node_modules/openapi-fetch/dist/index.d.ts:178:36 - error TS2344: Type 'M' does not satisfy the constraint 'HttpMethod'.
178 P extends PathsWithMethod<Paths, M>,
~
node_modules/openapi-fetch/dist/index.d.ts:177:44
177 export type ClientMethod<Paths extends {}, M> = <
~
This type parameter might need an `extends HttpMethod` constraint.
node_modules/openapi-fetch/dist/index.d.ts:179:31 - error TS2344: Type 'Paths[P]' does not satisfy the constraint '{}'.
Type 'Paths[PathsWithMethod<Paths, M>]' is not assignable to type '{}'.
Type 'Paths[Paths[keyof Paths] extends { [K in M]: any; } ? keyof Paths : never]' is not assignable to type '{}'.
Type 'Paths[keyof Paths]' is not assignable to type '{}'.
Type 'Paths[string] | Paths[number] | Paths[symbol]' is not assignable to type '{}'.
Type 'Paths[string]' is not assignable to type '{}'.
179 I extends MaybeOptionalInit<Paths[P], M>,
~~~~~~~~
node_modules/openapi-fetch/dist/index.d.ts:183:28 - error TS2536: Type 'M' cannot be used to index type 'Paths[P]'.
183 ) => Promise<FetchResponse<Paths[P][M], I[0]>>;
~~~~~~~~~~~
Found 5 errors in the same file, starting at: node_modules/openapi-fetch/dist/index.d.ts:83 Dropping back to 0.8.2, no errors found G:\grocy-micro-ui>npm run compile
[email protected] compile
shx rm -rf lib/ && tsc
G:\grocy-micro-ui> |
I guess this is because skipLibCheck is set in It seems that 0.8.2 did build without
I am using ESM ( |
Ah that’s really helpful info, thank you. To be honest I can’t seem to get away from that setting in any of my projects; there’s always at least 1 package with type errors (sometimes caused by unexpected package version combinations). But better to not be part of the problem I suppose! |
does 0.9.1 require any other updated deps?
The text was updated successfully, but these errors were encountered: