nrwl / nx

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

Nest app created with create-nx-workspace@13.8.4 fails to run #9207

Closed andynunes closed 2 years ago

andynunes commented 2 years ago

Current Behavior

Creating a new nx workspace with a nest app using the latest version of create-nx-workspace results in an application producing a fatal error when running nx serve ....

Note that this does not occur using create-nx-workspace@13.8.3 and it does not occur on 13.8.4 when creating an angular app (the only other one I tested)

npx create-nx-workspace@latest nx-create-app-test
✔ What to create in the new workspace · nest
✔ Application name                    · test-app
✔ Use Nx Cloud? (It's free and doesn't require registration.) · Yes

Workspace is created successfully

cd nx-create-app-test
nx build test-app
nx serve test-app

The error below then prevents the app from being served.

Expected Behavior

nx serve command succeeds.

Steps to Reproduce

Repo with result of running the above commands https://github.com/SERTMinistries/nx-create-app-test

Failure Logs

☁  nx-create-app-test [main] ⚡  nx serve test-app 
Error: Unable to resolve @nrwl/node:execute.
Cannot find executor 'execute' in /Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/node/executors.json.
    at Workspaces.readExecutor (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/tao/src/shared/workspace.js:92:19)
    at getExecutorForTask (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:135:22)
    at getCustomHasher (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:140:25)
    at TasksSchedule.<anonymous> (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:114:62)
    at Generator.next (<anonymous>)
    at /Users/andy.nunes/code/sert/nx-create-app-test/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at __awaiter (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/tslib/tslib.js:113:16)
    at TasksSchedule.hashTask (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:113:38)
    at TasksSchedule.<anonymous> (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:58:24)
Unexpected error:
Error: Unable to load hasher for task "test-app:serve"
    at getCustomHasher (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:145:15)
    at TasksSchedule.<anonymous> (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:114:62)
    at Generator.next (<anonymous>)
    at /Users/andy.nunes/code/sert/nx-create-app-test/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at __awaiter (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/tslib/tslib.js:113:16)
    at TasksSchedule.hashTask (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:113:38)
    at TasksSchedule.<anonymous> (/Users/andy.nunes/code/sert/nx-create-app-test/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:58:24)
    at Generator.next (<anonymous>)
    at /Users/andy.nunes/code/sert/nx-create-app-test/node_modules/tslib/tslib.js:117:75

Environment

☁  nx-create-app-test [main] ⚡  nx report

 >  NX   Report complete - copy this into the issue template

   Node : 14.18.1
   OS   : darwin arm64
   npm  : 8.3.0

   nx : 13.8.4
   @nrwl/angular : undefined
   @nrwl/cli : 13.8.4
   @nrwl/cypress : undefined
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.4
   @nrwl/eslint-plugin-nx : 13.8.4
   @nrwl/express : undefined
   @nrwl/jest : 13.8.4
   @nrwl/js : 13.8.4
   @nrwl/linter : 13.8.4
   @nrwl/nest : 13.8.4
   @nrwl/next : undefined
   @nrwl/node : 13.8.4
   @nrwl/nx-cloud : 13.1.6
   @nrwl/react : undefined
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : undefined
   @nrwl/tao : 13.8.4
   @nrwl/web : undefined
   @nrwl/workspace : 13.8.4
   typescript : 4.5.5
   rxjs : 7.5.4
   ---------------------------------------
   Community plugins:
teovillanueva commented 2 years ago

Currently having the same issue!

jpb06 commented 2 years ago

See https://github.com/nrwl/nx/issues/9168#issuecomment-1057897421

AgentEnder commented 2 years ago

This should be fixed in the latest, some things got released a bit early 😅. I'm going to close this out, but let us know if you still have issues.

andynunes commented 2 years ago

Looks to be fixed as of 13.8.5. Thanks!

esantelmo commented 2 years ago

Still happening in Jun16, 2022

AgentEnder commented 2 years ago

@esantelmo This was fixed and confirmed as fixed in 13.8.5. If you are experiencing issues in a version newer than 13.8.5, can you open a new issue complete with error logs, nx report, and reproduction steps?

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.