Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🧩 dependency used only via cli #934

@m-ronchi

Description

@m-ronchi

Discuss anything related to Knip

Hi,
I have a dependency (node-pg-migrate) that I use both in dev (inside a package.json script) and in prod (by just including it in the docker image, then I run it using npx node-pg-migrate as a command inside that image).

the problem is that by default, npx knip works, but npx knip --strict reports it as an unused dependencies. if I add it to config ignoreDependencies, then npx knip --strict works but npx knip reports it as Unused item in ignoreDependencies.

which is the correct way to make both commands work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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