Skip to content

fix(core): add workspaces path if package path is not included#28824

Merged
xiongemi merged 1 commit intomasterfrom
fix/not-import-uninstall-deps
Dec 6, 2024
Merged

fix(core): add workspaces path if package path is not included#28824
xiongemi merged 1 commit intomasterfrom
fix/not-import-uninstall-deps

Conversation

@xiongemi
Copy link
Copy Markdown
Contributor

@xiongemi xiongemi commented Nov 6, 2024

Current Behavior

  • when import to a path where is not in the workspaces, it currently just shows a warning. however, it will cause an error like "module not found" because there are packages not installed.

Expected Behavior

  • automatically add to the workspaces
    Screenshot 2024-11-08 at 12 58 42 AM

Related Issue(s)

Fixes #

@xiongemi xiongemi requested a review from a team as a code owner November 6, 2024 21:38
@xiongemi xiongemi requested a review from FrozenPandaz November 6, 2024 21:38
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Dec 6, 2024 7:24am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Nov 6, 2024

@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch 9 times, most recently from e594984 to 0cf563d Compare November 8, 2024 15:41
@xiongemi xiongemi requested review from a team and Coly010 as code owners November 8, 2024 15:41
@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch 2 times, most recently from 356f0d7 to 86c4253 Compare November 8, 2024 17:54
Comment thread packages/nx/src/utils/package-manager.ts Outdated
Comment thread packages/nx/src/command-line/import/import.ts Outdated
Comment thread packages/nx/src/command-line/import/import.ts Outdated
Comment thread packages/nx/src/command-line/import/import.ts Outdated
Comment thread packages/nx/src/command-line/init/init-v2.ts Outdated
Comment thread packages/nx/src/utils/package-manager.ts
Comment thread packages/nx/src/utils/package-manager.ts Outdated
Comment thread packages/nx/src/utils/package-manager.ts Outdated
@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch from 4438b44 to ae74ec7 Compare December 6, 2024 07:16
@xiongemi xiongemi merged commit 902eef5 into master Dec 6, 2024
@xiongemi xiongemi deleted the fix/not-import-uninstall-deps branch December 6, 2024 16:25
FrozenPandaz pushed a commit that referenced this pull request Dec 6, 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` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
- when import to a path where is not in the workspaces, it currently
just shows a warning. however, it will cause an error like "module not
found" because there are packages not installed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- automatically add to the workspaces
![Screenshot 2024-11-08 at 12 58
42 AM](https://github.com/user-attachments/assets/d36dd093-a0ce-45c3-a783-97244741971f)

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

Fixes #

(cherry picked from commit 902eef5)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants