hyperjump-io / json-schema

JSON Schema Validation, Annotation, and Bundling. Supports Draft 04, 06, 07, 2019-09, 2020-12, OpenAPI 3.0, and OpenAPI 3.1
https://json-schema.hyperjump.io/
MIT License
224 stars 21 forks source link

Undeclared rimraf dependency used in post install script #16

Closed jviotti closed 2 years ago

jviotti commented 2 years ago

Looks like this package makes use of rimraf as a postinstall script (https://github.com/hyperjump-io/json-schema-validator/blob/main/package.json#L16), which might fail for some people if rimraf is not previously installed.

See https://github.com/sourcemeta/alterschema/issues/44.

That said, I see rimraf is being ran using npx, which is supposed to pull it on demand, right? Maybe that doesn't quite work on some cases? (it seems to work for me)

jdesrosiers commented 2 years ago

I see no reason why it shouldn't work and it works fine for me and others. I can't do anything without a reproducible example.

jdesrosiers commented 2 years ago

I figured out that the problem occurs when installing globally using sudo. Example: sudo npm install -g @hyperjump/json-schema

jdesrosiers commented 2 years ago

I just published a patch that should fix the problem.

jviotti commented 2 years ago

Awesome! Thanks a lot @jdesrosiers.