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

[Angular] Migration to Nx v.12.6 is not finding the libs dependencies anymore #6648

Closed
gerardcastell opened this issue Aug 9, 2021 · 10 comments · Fixed by #6902
Closed

[Angular] Migration to Nx v.12.6 is not finding the libs dependencies anymore #6648

gerardcastell opened this issue Aug 9, 2021 · 10 comments · Fixed by #6902
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@gerardcastell
Copy link

I have taken a glance at your update on #6443, but, unfortunately it is NOT working neither if I run the migration to the latest version (Nx. 12.6). The error keeps the same.
Steps to reproduce:
Environemnt:

Node : 12.22.1
OS : darwin x64
npm : 6.14.12

nx : Not Found
@nrwl/angular : 12.5.8
@nrwl/cli : 12.5.8
@nrwl/cypress : 12.5.8
@nrwl/devkit : 12.5.8
@nrwl/eslint-plugin-nx : 12.5.8
@nrwl/express : Not Found
@nrwl/jest : 12.5.8
@nrwl/linter : 12.5.8
@nrwl/nest : 12.5.8
@nrwl/next : Not Found
@nrwl/node : 12.5.8
@nrwl/nx-cloud : 12.2.7
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.5.8
@nrwl/web : Not Found
@nrwl/workspace : 12.5.8
@nrwl/storybook : 12.5.8
@nrwl/gatsby : Not Found
typescript : 4.2.4

  1. Git clone the repository https://github.com/gerardcastell/nx-monorepo-libs-deps
  2. Run "nx migrate latest"
  3. Run "npm i"
  4. Run "nx migrate --run-migrations"
  5. Finally, run "nx build"

The error displayed on the console is the same one:
Screenshot 2021-07-27 at 11 53 57

The resulting environment properties now are:
Node : 12.22.1
OS : darwin x64
npm : 6.14.12

nx : Not Found
@nrwl/angular : 12.6.2
@nrwl/cli : 12.6.2
@nrwl/cypress : 12.6.2
@nrwl/devkit : 12.6.2
@nrwl/eslint-plugin-nx : 12.6.2
@nrwl/express : Not Found
@nrwl/jest : 12.6.2
@nrwl/linter : 12.6.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.6.2
@nrwl/web : Not Found
@nrwl/workspace : 12.6.2
@nrwl/storybook : 12.6.2
@nrwl/gatsby : Not Found
typescript : 4.3.5

What I realised is that if I create a new repository with the command "npx create-nx-workspace@latest" and then perform the steps explained at #6443 the error is fixed and the dependencies are well defined, so I think that the error here is solved for new projects but not for already existing ones that needs the migration step to get the Nx 12.6.0.

Could you please check my case and consider reopen this issue?
Thank you in advance!

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Aug 9, 2021
@Coly010 Coly010 self-assigned this Aug 9, 2021
@Coly010
Copy link
Contributor

Coly010 commented Aug 9, 2021

Thanks for raising this! I'll add a migration that will recalculate invalid importPaths

@gerardcastell
Copy link
Author

Any news about this issue? This is blocking my company app from update. Thanks!

@Coly010
Copy link
Contributor

Coly010 commented Aug 18, 2021

Hi @gerardcastell
We have the work needed to fix this in a migration planned and should be released soon.

However, in the meantime, you can manually fix it by changing the package.json of the buildable libraries that are affected.

The name property in the package.json needs to match the key of the property path in the tsconfig.base.json

@gerardcastell
Copy link
Author

Thank you so much! We really appreciate your efforts! We will stay tuned

@gerardcastell
Copy link
Author

Hello again! Is this fix included on NX 12.8? @Coly010

@Coly010
Copy link
Contributor

Coly010 commented Aug 26, 2021

@gerardcastell No, I'll update here when it's complete :)

Coly010 added a commit to Coly010/nx that referenced this issue Aug 31, 2021
Fixes broken importPaths and package.json names due to incorrect logic that has already been fixed

ISSUES CLOSED: nrwl#6648
FrozenPandaz pushed a commit that referenced this issue Sep 1, 2021
Fixes broken importPaths and package.json names due to incorrect logic that has already been fixed

ISSUES CLOSED: #6648
@Coly010
Copy link
Contributor

Coly010 commented Sep 1, 2021

@gerardcastell This should be included as a migration in Nx 12.9.0

sumitparakh pushed a commit to sumitparakh/nx that referenced this issue Sep 1, 2021
Fixes broken importPaths and package.json names due to incorrect logic that has already been fixed

ISSUES CLOSED: nrwl#6648
@Coly010
Copy link
Contributor

Coly010 commented Sep 7, 2021

@gerardcastell 12.9.0 is released and this migration should be included. Can you try it out and let me know if it works for you

@gerardcastell
Copy link
Author

gerardcastell commented Sep 8, 2021

Hi! thanks for the job! It seems like it has solved the problem but now some other libraries have different issues, for instance, when building an Ui lib that was created before a year ago with the proper nx version, it displays the following error:
Screenshot 2021-09-08 at 19 14 54

The new UI libs created with Nx.12 are also raising up this problem so it seems like something is missing in the migration.
I am attaching the same repo aforementioned when you could run "nx build core-buildable" to build the lib which exports a simple component in order to see how it fails. Any idea @Coly010 ? Btw, thank you so much for your efforts we really appreciate it!

ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this issue Sep 16, 2021
Fixes broken importPaths and package.json names due to incorrect logic that has already been fixed

ISSUES CLOSED: nrwl#6648
@github-actions
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 Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants