Comments (9)
Sweet. 2.1.1 works again. Thanks for digging into the issue.
from ts-json-schema-generator.
thx its solved
working with v18, v20 ....
from ts-json-schema-generator.
Oh weird. I didn't test the other versions (but should have). I'll bump the minimum requirement to make it correct. Thanks for trying the different versions!
from ts-json-schema-generator.
Works for me. Make sure you have a new enough node version. I have v20.12.2.
❯ npx ts-json-schema-generator --help
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
(node:17662) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Usage: ts-json-schema-generator [options]
Options:
-p, --path <path> Source file path
-t, --type <name> Type name
-i, --id <name> $id for generated schema
-f, --tsconfig <path> Custom tsconfig.json path
-e, --expose <expose> Type exposing (choices: "all", "none", "export", default: "export")
-j, --jsDoc <extended> Read JsDoc annotations (choices: "none", "basic", "extended", default: "extended")
--markdown-description Generate `markdownDescription` in addition to `description`.
--functions <functions> How to handle functions. `fail` will throw an error. `comment` will add a comment. `hide` will treat the function like a NeverType or HiddenType. (choices: "fail",
"comment", "hide", default: "comment")
--minify Minify generated schema (default: false)
--unstable Do not sort properties
--strict-tuples Do not allow additional items on tuples
--no-top-ref Do not create a top-level $ref definition
--no-type-check Skip type checks to improve performance
--no-ref-encode Do not encode references
-o, --out <file> Set the output file (default: stdout)
--validation-keywords [value] Provide additional validation keywords to include (default: [])
--additional-properties Allow additional properties for objects with no index signature (default: false)
-V, --version output the version number
-h, --help display help for command
from ts-json-schema-generator.
@domoritz
in your package json you say that the software should be usable with node 18 and higher
i think you should also adapt the package json if you can only use the software with the latest version
ts-json-schema-generator/package.json
Lines 44 to 46 in 6b6c47e
it also does not work with version 20
not working with v20.4.0
from ts-json-schema-generator.
v2.0.1...v2.1.0#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
Unknown file extension "" for ../node_modules/ts-json-schema-generator/bin/ts-json-schema-generator.
Loading extensionless files is not supported inside of "type":"module" package.json contexts.
The package.json file ../node_modules/ts-json-schema-generator/package.json caused this "type":"module" context.
Try changing ../node_modules/ts-json-schema-generator/bin/ts-json-schema-generator to have a file extension.
Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"ts-json-schema-generator":"./bin/ts-json-schema-generator.js"}}
means that if type: module
is used, all files with extensions must be used
ts-json-schema-generator/package.json
Lines 8 to 10 in 6b6c47e
so why not link the js file from the dist
../dist/ts-json-schema-generator.js
from ts-json-schema-generator.
actually npm is only bothered by the missing extension for the binary resource
from ts-json-schema-generator.
https://github.com/vega/ts-json-schema-generator/blob/fbb72f4e4267b428f9135e03a2f0f5bc39a0a6e9/bin/ts-json-schema-generator doesn't have an extension but imports a file with an extension. Are you saying we might fix the issue by adding the extension?
from ts-json-schema-generator.
https://github.com/vega/ts-json-schema-generator/blob/fbb72f4e4267b428f9135e03a2f0f5bc39a0a6e9/bin/ts-json-schema-generator doesn't have an extension but imports a file with an extension. Are you saying we might fix the issue by adding the extension?
yes excatly, thats what the error message is saying
from ts-json-schema-generator.
Related Issues (20)
- Lowercase type breaks with a comment HOT 1
- Bug: `ReferenceError: structuredClone is not defined` HOT 4
- constant number is converted to a generic `number` type HOT 4
- How to exclude underscore properties from json schema ? HOT 1
- Issues with generation of Union Type of Union Type on a Record HOT 1
- Argument of type 'Config' is not assignable to parameter of type 'CompletedConfig' in ts-json-schema-generator 2.0.0 HOT 2
- "foo" | "bar" | string; should not only map to a string HOT 9
- Improved Promise handling to support packages like Prisma HOT 1
- Literal and Record<never, never> crates empty object HOT 1
- Cannot migrate to version 2 due to typescript error type CompletedConfig HOT 2
- V2 creates empty definitions after updating from V1 HOT 5
- CLI usage is throwing an error with node 22 HOT 3
- RegExp types are now emitted, breaking schema validation (v2.1.1) HOT 1
- Error when following exports?
- Dist types now require @types/ts-expose-internals HOT 9
- Fix CJS imports HOT 8
- Invalid index in type HOT 9
- CLI - ENOENT: no such file or directory, open 'package.json' HOT 2
- Error: Unknown type "undefined" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-json-schema-generator.