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

Command undefined #1

Open
sachaw opened this issue Mar 21, 2023 · 2 comments
Open

Command undefined #1

sachaw opened this issue Mar 21, 2023 · 2 comments

Comments

@sachaw
Copy link

sachaw commented Mar 21, 2023

I'm trying to generate some typescript code from xml schemas but get the following error:

node_modules/.pnpm/@xsd-tools+typescript@0.2.0_p6pko7y75jne7bzxkmbtbrojey/node_modules/@xsd-tools/typescript/dist/bin/xsd-ts.js:52
    .command('generate [schema] [output]', { isDefault: true })
    ^

TypeError: Cannot read properties of undefined (reading 'command')
    at Object.<anonymous> (node_modules/.pnpm/@xsd-tools+typescript@0.2.0_p6pko7y75jne7bzxkmbtbrojey/node_modules/@xsd-tools/typescript/dist/bin/xsd-ts.js:52:5)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47
@markusgeert
Copy link

Adding a version number to the package.json fixed it for me

@gurisko
Copy link

gurisko commented Nov 10, 2023

It seems that environment variable npm_package_version must be set in order to not throw here.

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

3 participants