question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unable to resolve @nrwl/node:execute.

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:19
  • Comments:33 (4 by maintainers)

github_iconTop GitHub Comments

83reactions
AliYusuf95commented, Mar 3, 2022

@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"
33reactions
ozyman42commented, Mar 15, 2022

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

nx.dev creating first app failure with cannot find module
In trying out nx.dev, I ran this command npx nx generate @nrwl/node:app ...
Read more >
Error: Unable to resolve @nrwl/node:execute
Al ejecutar el API con nx serve api obtuve el siguiente error: Error: Unable to resolve @nrwl/node:execute. Cannot find executor 'execute' ...
Read more >
@nrwl/node - npm
The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.. Latest version: 15.4.1, ...
Read more >
@nrwl/js:tsc | Nx
@nrwl/js:tsc. Builds using TypeScript. Options can be configured in project.json when defining the executor, or when invoking it.
Read more >
Nx/community - nrwl - Gitter
when generating api in the nx workspace apps [ nx g @nrwl/nest:app api ... (node:32464) UnhandledPromiseRejectionWarning: Error: Command failed: npx tao new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found