Openapicmd imports indent-string here:
|
import * as indent from 'indent-string'; |
however, it does not list
indent-string in it's package.json. This causes an issue where the package manager may choose a version of indent-string that is not compatible with the way
indent-string is being imported on this line (version 5 has a different module format than verison 4, which is what this library is expecting).
This causes a runtime error TypeError: indent is not a function.. when running openapi typegen
Also, just a recommendation but pnpm would catch this type of issue where npm still lacks strictness around imports needing to be listed in package.json vs just letting it slide and finding a transitive dep if it exists.
Openapicmd imports
indent-stringhere:openapicmd/src/typegen/typegen.ts
Line 2 in c5e73e8
however, it does not list
indent-stringin it's package.json. This causes an issue where the package manager may choose a version of indent-string that is not compatible with the wayindent-stringis being imported on this line (version 5 has a different module format than verison 4, which is what this library is expecting).This causes a runtime error
TypeError: indent is not a function..when runningopenapi typegenAlso, just a recommendation but
pnpmwould catch this type of issue wherenpmstill lacks strictness around imports needing to be listed in package.json vs just letting it slide and finding a transitive dep if it exists.