0

I have created sample nx-monorepo for angular using v12. The original application is a polyrepo with angular cli using old version of lerna, so I am trying to upgrade it to 16 and want to go forward with nx.

Here is the structure.

Root
|-- apps
|   |-- app1
|   |-- app2
|-- libs
|   |-- lib1
|      | --package.json
|   |-- lib2
|      | --package.json
|--other-angular-and-nx-config-files
|--nx.json
|--package.json

Now when I run the nx migrate 13 command, it updated the root package.json file to version 13 but the package.json of angular libraries in the libs folder version still stays at 12. I have tried many resourses but did not find any useful documentation, not even in the nx documentation.

Mitesh
  • 71
  • 12
  • You can just remove package.json files from libs. That information will not be used anyway. – OZ_ Sep 01 '23 at 06:14
  • Even when we build and publish the library? – Mitesh Sep 01 '23 at 06:18
  • You do not build "libs", you only build "apps". They all will have deps that are declared in the root package.json. – OZ_ Sep 01 '23 at 06:20
  • I am using this libs outside of this nx project in other interfaces. – Mitesh Sep 01 '23 at 06:21
  • Maybe it will be easier to create a new repo with "publishable" libs (https://nx.dev/concepts/more-concepts/buildable-and-publishable-libraries), and copy source code there. – OZ_ Sep 01 '23 at 06:28

0 Answers0