nx: Error: Unable to resolve @nrwl/node:execute.
Current Behavior
I’m receiving this error after clean express template created:
❯ npx create-nx-workspace
npx: instaló 48 en 13.442s
✔ Workspace name (e.g., org name) · bullflix-nx
✔ What to create in the new workspace · express
✔ Application name · api
✔ Use Nx Cloud? (It's free and doesn't require registration.) · No
> NX Nx is creating your v13.8.4 workspace.
To make sure the command works reliably in all environments, and that the preset is applied correctly,
Nx will run "npm install" several times. Please wait.
✔ Installing dependencies with npm
✔ Nx has successfully created the workspace.
❯ cd bullflix-nx/
❯ nx run api:serve
Error: Unable to resolve @nrwl/node:execute.
Cannot find executor 'execute' in /Users/nacho/Code/bullflix-nx/node_modules/@nrwl/node/executors.json.
at Workspaces.readExecutor (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/tao/src/shared/workspace.js:92:19)
at getExecutorForTask (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:135:22)
at getCustomHasher (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:140:25)
at TasksSchedule.<anonymous> (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:114:62)
at Generator.next (<anonymous>)
at /Users/nacho/Code/bullflix-nx/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at __awaiter (/Users/nacho/Code/bullflix-nx/node_modules/tslib/tslib.js:113:16)
at TasksSchedule.hashTask (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:113:38)
at TasksSchedule.<anonymous> (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:58:24)
Unexpected error:
Error: Unable to load hasher for task "api:serve"
at getCustomHasher (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/utils.js:145:15)
at TasksSchedule.<anonymous> (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:114:62)
at Generator.next (<anonymous>)
at /Users/nacho/Code/bullflix-nx/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at __awaiter (/Users/nacho/Code/bullflix-nx/node_modules/tslib/tslib.js:113:16)
at TasksSchedule.hashTask (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:113:38)
at TasksSchedule.<anonymous> (/Users/nacho/Code/bullflix-nx/node_modules/@nrwl/workspace/src/tasks-runner/tasks-schedule.js:58:24)
at Generator.next (<anonymous>)
at /Users/nacho/Code/bullflix-nx/node_modules/tslib/tslib.js:117:75
Expected Behavior
Start the server
Steps to Reproduce
Run npx create-nx-workspace or npx create-nx-workspace@latest and the run nx serve api or nx run api:serve
Repo example(https://github.com/icastillejogomez/bullflix-nx)
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Environment
MacOS with the latest os version.
❯ node -v
v16.13.1
❯ npm -v
6.14.15
❯ yarn -v
1.22.11
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 19
- Comments: 37 (5 by maintainers)
@icastillejogomez To fix the issue just replace the following executers:
"executor": "@nrwl/node:execute"->"executor": "@nrwl/node:node""executor": "@nrwl/node:build"->"executor": "@nrwl/node:webpack"They need to stop making these breaking changes in non major upgrades
and also replace @nrwl/node:package -> @nrwl/js:tsc
the problems in my libs, the reference is from: #9086
shouldn’t be this a part of a migration?
I think we should keep this ticket open until the issue is fixed in Nx.
This breaks the tutorial https://nx.dev/getting-started/nx-and-typescript
I encountered this issue too. Replacing all occurrences of
"executor":"@nrwl/node:execute"with
"executor": "@nrwl/node:node"in the project.json file (just make a project-wide search for the string “node:execute” and you should find it).This happened in the latest release 13.8.4. @jaysoo I think migrations in #9086 prepared for 13.9.0 but it got released before that.
this is still happening on fresh project generations
all executors are in order
I
I have NX version 13.9.5 and I still get the error above. My DevDependencies in package.json for “@nrwl” is on 13.3.6. This is all on Windows 10. Everything is fine on my MacOS with NX version 13.3.6. So I am trying to downgrade the NX version on the Windows laptop from 13.9.5 to 13.3.6 but I’m not having any luck.