13.0.22 is broken: [error] TypeError: Cannot read properties of undefined (reading 'split')
The latest version (13.0.22) seems to be broken. For any swagger-spec I tried I always receive:
ℹ start generating your typescript api
[error] TypeError: Cannot read properties of undefined (reading 'split')
Which version we can use?
Trying 13.0.21: same error.
More detailed trace back:
main (yarn): no error
13.0.22 (yarn): [error] TypeError: Cannot read properties of undefined (reading 'split')
13.0.21 (yarn): [error] TypeError: Cannot read properties of undefined (reading 'split')
13.0.20 (yarn): [error] TypeError: e.values(...).some is not a function
13.0.19 (yarn): [error] TypeError: e.values(...).some is not a function
13.0.18 (yarn): [error] TypeError: u.merge is not a function
13.0.17 (yarn): [error] TypeError: u.merge is not a function
13.0.16 (pnpm): no error
Code used for testing:
async generate() {
const { files } = await generateApi({
output: false,
input: this.specLocalPath,
moduleNameFirstTag: true,
moduleNameIndex: 1,
})
// ...
}
Swagger used for testing: petstore.yaml
So the most recent working version is 13.0.16
Same error here - my solution:
@Argeento I expect you shouldn't use ^ before the version specifier, as npm will update it back to 13.0.23.
Use the specific version like "13.0.16" (this one works).
@js2me Any updates on this?
The issue persist in the latest 13.0.23 version.
It should be fixed in the latest release.