studds / nx-aws

AWS plugins for nx
36 stars 10 forks source link

Upgrade from `14.0.2` to nx `14.5.1` throws error when building #105

Closed maxime1992 closed 2 years ago

maxime1992 commented 2 years ago

I now get that error:

NX Cannot find module '@nrwl/workspace/src/utilities/run-webpack'

maxime1992 commented 2 years ago

Never mind, I had an issue during the upgrade and had to pin @nrwl/workspace to latest using the resolutions field of package.json.

Once the update was done, I just had to remove the resolution field and it's back to normal.

That said, I still had an error:

{{my-project-name}} does not have a root.

Took me a while to figure out that I was missing a field in my project.json: https://nx.dev/configuration/projectjson#project-configuration

In project.json I had this: "sourceRoot": "apps/{{my-project-name}}/src", and I needed to add a line "root": "apps/{{my-project-name}}",