Skip to content

Using the changeset CLI with the NPX command #1426

@Netail

Description

@Netail

Problem

One of the features of the npx command is to use the executable of a package without having to pre-install it in your repository.

In our case we use the npx command in our ci/cd pipeline, so we don't have to install all node modules of the root package.json to save some seconds in our github actions ci/cd pipeline.

The first issue I noticed is in the documentation, which mentions npx changeset, this only works if the package is already installed, else NPX fetches https://registry.npmjs.org/changeset, which is related to the https://github.com/eugeneware/changeset codebase. npx @changesets/cli works instead. FIXED

The second issue is using npx @changesets/cli version, which results in Error: Cannot find module '@changesets/cli/changelog' as it's not installed as a regular node module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions