node.jsnrwl-nxnrwl

NX @nrwl/node generator error "Cannot find module 'nx/src/utils/code-frames"


I am attempting to generate a new node project using @nrwl/node and when I use the generator I am met with the error

 NX   Cannot find module 'nx/src/utils/code-frames'

inhibiting me from running the generator.

my nx version is 15.2.1 my @nrwl/node version is 15.9.2 and my node version is 16.17.0

Ive attempted to reinstall the packages multiple times to no avail.


Solution

  • nx and @nrwl/node must be at the same version. You should see an error if you run nx workspace-lint (prior to its deprecation), or during nx report on newer versions.

    nx migrate latest would get things synced back up.