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

Generator crashed when no package version is set #1986

Closed
jkoenig134 opened this issue Jun 5, 2024 · 4 comments
Closed

Generator crashed when no package version is set #1986

jkoenig134 opened this issue Jun 5, 2024 · 4 comments

Comments

@jkoenig134
Copy link

I want to generate json schemas inside a package where in it's package.json no version is specified.

in https://github.com/vega/ts-json-schema-generator/blob/next/ts-json-schema-generator.ts#L52 you seem to use the version of my package.json instead of yours and therefore the generator fails with the following error:

<path>/node_modules/ts-json-schema-generator/dist/ts-json-schema-generator.js:35
    .parse(process.argv)
    ^

TypeError: Cannot read properties of undefined (reading 'parse')
    at file:///<path>/node_modules/ts-json-schema-generator/dist/ts-json-schema-generator.js:35:5
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)

Node.js v20.13.1
@jkoenig134 jkoenig134 changed the title Generator crashed when no package version is set. Generator crashed when no package version is set Jun 5, 2024
@domoritz
Copy link
Member

domoritz commented Jun 5, 2024

Is this fixed by #1979?

@domoritz domoritz closed this as completed Jun 5, 2024
@jkoenig134
Copy link
Author

@domoritz I think so, but when will this be released?

@domoritz
Copy link
Member

domoritz commented Jun 5, 2024

Great. It's already in prerelease so I just need to make time to make another release.

@jkoenig134
Copy link
Author

works great, thanks for releasing so quickly! 🎉

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