yesterday one of my experemental package was broken when was installed freshly (without package-lock.json and node_modules) with next error:
TypeError: Cannot read property 'dereference' of undefined
at crawl (node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:44:15)
at Object.dereference [as default] (node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:19:22)
at OpenAPIClientAxios.initSync (node_modules/openapi-client-axios/client.js:206:34)
at Object.B.default (<index.js>:42:25)
at new e.B (<index.js>:384:11)
After some drilling of some sources I detect that reasons of the problem is in:
openapi-client-axios incorrect incorrect usage of derefence from that library
derefence has a second options param that type is $RefParserOptions and was never marked as optional
So, that error can be catched by anyone who will install openapi-client-axios in new projects or while force deps upgrade,
by that reason asking to fix it asap.
Hi @anttiviljami,
yesterday one of my experemental package was broken when was installed freshly (without package-lock.json and node_modules) with next error:
After some drilling of some sources I detect that reasons of the problem is in:
json-schema-ref-parser
library update from 9.0.6 to 9.0.7 release 9.0.7 "breakin" change (but not breakin by a docs)openapi-client-axios incorrect
incorrect usage ofderefence
from that libraryderefence
has a secondoptions
param that type is $RefParserOptions and was never marked as optionalnpm install
that does not respectpackage-lock.json
of dependencies https://github.com/npm/npm/issues/19458So, that error can be catched by anyone who will install
openapi-client-axios
in new projects or while forcedeps upgrade
, by that reason asking to fix it asap.PR with fix: https://github.com/anttiviljami/openapi-client-axios/pull/54