nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.28k stars 2.32k forks source link

"Cannot find module 'nx/src/utils/app-root'" error while creating a NestJS app in my monorepo #12104

Closed LouisLecouturier closed 1 year ago

LouisLecouturier commented 2 years ago

Current Behavior

when I try to create a NestJs app using the NxConsole plugin on VSCode I get this error :

Cannot find module 'nx/src/utils/app-root'

I don't get this error when I create a NextJS or a React App...

What should I do ?

Failure Logs

 > NX   Generating @nrwl/nest:application

 >  NX   Cannot find module 'nx/src/utils/app-root'

   Require stack:
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/@nrwl/nest/node_modules/@nrwl/devkit/index.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/@nrwl/nest/src/generators/application/application.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/nx/src/config/workspaces.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/nx/src/command-line/generate.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/nx/src/command-line/nx-commands.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/nx/bin/init-local.js
   - /Users/louislecouturier/Documents/Resply/src/resply/node_modules/nx/bin/nx.js
   Pass --verbose to see the stacktrace.

Environment

Here's my nx report

 Node : 16.15.1
   OS   : darwin arm64
   yarn : 1.22.19

   nx : 14.5.4
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.5.4
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.4
   @nrwl/eslint-plugin-nx : 14.5.4
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.4
   @nrwl/js : 14.7.6
   @nrwl/linter : 14.5.4
   @nrwl/nest : 14.7.6
   @nrwl/next : 14.5.4
   @nrwl/node : 14.7.6
   @nrwl/nx-cloud : 14.3.0
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 14.5.4
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.5.4
   @nrwl/web : 14.5.4
   @nrwl/workspace : 14.5.4
   typescript : 4.7.4
   ---------------------------------------
   Community plugins:
FrozenPandaz commented 1 year ago

Can you please align your @nrwl/* versions and see if the issue still exists?

LouisLecouturier commented 1 year ago

Seems to be working now, thanks !

Node : 16.15.1
   OS   : darwin arm64
   yarn : 1.22.19

   nx : 14.7.6
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.5.4
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.4
   @nrwl/eslint-plugin-nx : 14.5.4
   @nrwl/expo : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.4
   @nrwl/js : 14.5.4
   @nrwl/linter : 14.5.4
   @nrwl/nest : 14.7.6
   @nrwl/next : 14.5.4
   @nrwl/node : 14.5.4
   @nrwl/nx-cloud : 14.3.0
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 14.5.4
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.5.4
   @nrwl/web : 14.5.4
   @nrwl/workspace : 14.5.4
   typescript : 4.7.4
github-actions[bot] commented 1 year ago

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.