Skip to content

openapicmd needs explicit dependency on indent-string #74

Description

@LucasHillDex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions