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

Renaming/Moving NextJS library with @nx/workspace:move doesn't work for the server import path #20821

Closed
1 of 4 tasks
michalvadak opened this issue Dec 18, 2023 · 2 comments · Fixed by #23311
Closed
1 of 4 tasks
Assignees
Labels
outdated scope: misc Misc issues scope: nextjs Issues related to NextJS support for Nx type: bug

Comments

@michalvadak
Copy link

Current Behavior

When renaming/moving NextJS library with @nx/workspace:move only @org/library-1 import path is changed.

The @org/library-1/server stays the same.

Expected Behavior

When renaming/moving NextJS library with @nx/workspace:move both import paths @org/library-1 and @org/library-1/server should be changed.

GitHub Repo

No response

Steps to Reproduce

  1. Generate NextJS library nx g @nx/next:library library-1 --directory=libs/library-1
  2. Rename it nx g move --projectName library-1 --newProjectName library-2 --destination libs/library-2

Nx Report

Node   : 20.10.0
   OS     : darwin-arm64
   yarn   : 1.22.19
   
   nx (global)        : 17.2.3
   nx                 : 17.2.3
   @nx/js             : 17.2.3
   @nx/jest           : 17.2.3
   @nx/linter         : 17.2.3
   @nx/eslint         : 17.2.3
   @nx/workspace      : 17.2.3
   @nx/devkit         : 17.2.3
   @nx/eslint-plugin  : 17.2.3
   @nx/next           : 17.2.3
   @nx/playwright     : 17.2.3
   @nx/react          : 17.2.3
   @nrwl/tao          : 17.2.3
   @nx/web            : 17.2.3
   typescript         : 5.2.2

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

No response

@AgentEnder AgentEnder added scope: nextjs Issues related to NextJS support for Nx scope: misc Misc issues labels Dec 21, 2023
@alexandr2110pro
Copy link

Hey Nx Team! Pretty annoying thing. Can you give us ETA on the fix?

@ndcunningham ndcunningham self-assigned this May 10, 2024
ndcunningham added a commit that referenced this issue May 13, 2024
#23311)

## Current
When you using `@nx/workspace:move` after create a Next.js library the
server path remains unchanged.

## Expected
The server path is changed as well as the main entry point for the
library path.

Fixes: #20821
FrozenPandaz pushed a commit that referenced this issue May 14, 2024
#23311)

## Current
When you using `@nx/workspace:move` after create a Next.js library the
server path remains unchanged.

## Expected
The server path is changed as well as the main entry point for the
library path.

Fixes: #20821
(cherry picked from commit d879279)
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 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: misc Misc issues scope: nextjs Issues related to NextJS support for Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants