Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nx migrate doesn't display errors or warnings if package does not exist #22308

Closed
1 of 4 tasks
mpsanchis opened this issue Mar 14, 2024 · 1 comment · Fixed by #23317
Closed
1 of 4 tasks

Nx migrate doesn't display errors or warnings if package does not exist #22308

mpsanchis opened this issue Mar 14, 2024 · 1 comment · Fixed by #23317
Assignees
Labels

Comments

@mpsanchis
Copy link
Contributor

Current Behavior

Running the command:

npx nx migrate some-random-package-name@1.0.0

Results in:

 NX   The migrate command has run successfully.

- package.json has been updated.
- There are no migrations to run, so migrations.json has not been created.

Expected Behavior

Running a command with a package and a version that do not exist should throw an error, or at least display a warning. This would help development of custom plugins, making it easier to find errors such as typos.

GitHub Repo

No response

Steps to Reproduce

  1. Run npx nx migrate some-random-package-name@1.0.0
  2. See console output

Nx Report

Node   : 18.18.2
OS     : darwin-arm64
pnpm   : 8.10.0

nx             : 18.0.8
@nx/js         : 17.2.8
@nx/jest       : 17.2.8
@nx/linter     : 17.2.8
@nx/eslint     : 17.2.8
@nx/workspace  : 18.0.8
@nx/devkit     : 17.2.8
@nrwl/devkit   : 16.10.0
@nx/plugin     : 17.2.8
@nx/react      : 17.2.8
@nrwl/tao      : 18.0.8
@nx/web        : 17.2.8
typescript     : 4.9.5

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@mpsanchis mpsanchis changed the title Nx migrate doesn't display errors or warnings if package does not existNode : 18.18.2 OS : darwin-arm64 pnpm : 8.10.0 nx : 18.0.8 @nx/js : 17.2.8 @nx/jest : 17.2.8 @nx/linter : 17.2.8 @nx/eslint : 17.2.8 @nx/workspace : 18.0.8 @nx/devkit : 17.2.8 @nrwl/devkit : 16.10.0 @nx/plugin : 17.2.8 @nx/react : 17.2.8 @nrwl/tao : 18.0.8 @nx/web : 17.2.8 typescript : 4.9.5 Nx migrate doesn't display errors or warnings if package does not exist Mar 14, 2024
@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Mar 15, 2024
FrozenPandaz pushed a commit that referenced this issue May 16, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
Migrations are a noop if the package can't be fetched

## Expected Behavior
There is a warning if the package doesn't exist

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22308
FrozenPandaz pushed a commit that referenced this issue May 21, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
Migrations are a noop if the package can't be fetched

## Expected Behavior
There is a warning if the package doesn't exist

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22308

(cherry picked from commit 7a34a46)
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants