Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory" when moving/renaming projects #26783

Open
1 of 4 tasks
Bulletninja opened this issue Jul 1, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@Bulletninja
Copy link

Bulletninja commented Jul 1, 2024

Current Behavior

$ npx nx build orders-clients-store --verbose

[NX CLOUD] Verifying current cloud bundle
[NX CLOUD] A local bundle currently exists:  {
  version: '2406.29.1',
  fullPath: '/Users/luis/projects/playerasdememes.com/.nx/cache/cloud/2406.29.1'
}
[NX CLOUD] Last verification was within the past 30 minutes, will not verify this time
[NX CLOUD] Done:  /Users/luis/projects/playerasdememes.com/.nx/cache/cloud/2406.29.1
[Nx Cloud Debug] Nx invoked by runner, skipping lock acquisition
[Nx Cloud] Unable to detect a VCS context from the environment.

 NX   RunStart


{
  "meta": {},
  "branch": null,
  "runGroup": "ee08ecf3b81615fca806e5d1374cd995edd696bf",
  "ciExecutionId": null,
  "ciExecutionEnv": "",
  "hashes": [
    "17009004496805467346"
  ],
  "machineInfo": {
    "machineId": "zqpW3hRFqpLhySRjh4WJxA==",
    "platform": "darwin",
    "version": "Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000",
    "cpuCores": 8
  },
  "vcsContext": null,
  "clientInstanceSource": "CLOUD_RUNNER",
  "clientInstanceId": "a64778ff-2e76-41db-99da-caaa1e23619f"
}

RunStart duration: 173

 NX   Nx Cloud: Cache miss 17009004496805467346.


> nx run orders-clients-store:build:production


 NX   ENOENT: no such file or directory, scandir 'orders/clients/store/public'


Error: ENOENT: no such file or directory, scandir 'orders/clients/store/public'
    at readdirSync (node:fs:1508:26)
    at checkPublicDirectory (/Users/luis/projects/playerasdememes.com/node_modules/@nx/next/src/executors/build/lib/check-project.js:8:36)
    at buildExecutor (/Users/luis/projects/playerasdememes.com/node_modules/@nx/next/src/executors/build/build.impl.js:21:46)
    at runExecutorInternal (/Users/luis/projects/playerasdememes.com/node_modules/nx/src/command-line/run/run.js:106:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/luis/projects/playerasdememes.com/node_modules/nx/src/command-line/run/run.js:187:44
    at async handleErrors (/Users/luis/projects/playerasdememes.com/node_modules/nx/src/utils/params.js:9:24)
    at async process.<anonymous> (/Users/luis/projects/playerasdememes.com/node_modules/nx/bin/run-executor.js:59:28)

Expected Behavior

It should just build, it did before renamin/moving, and renaming back doesn't get rid of the error, still fails at finding a "public" directory.

GitHub Repo

No response

Steps to Reproduce

  1. Have an app
  2. Move it (i.e. npx nx g @nrwl/workspace:move --projectName www --destination store. Doesn't matter if renamed manually, derived, etc)
  3. Fail to build for ever even if moving/renaming back

Nx Report

npx nx report

 NX   Report complete - copy this into the issue template

Node   : 20.12.2
OS     : darwin-arm64
npm    : 10.8.1

nx                 : 19.3.2
@nx/js             : 19.3.2
@nx/jest           : 19.3.2
@nx/linter         : 19.3.2
@nx/eslint         : 19.3.2
@nx/workspace      : 19.3.2
@nx/devkit         : 19.3.2
@nx/eslint-plugin  : 19.3.2
@nx/next           : 19.3.2
@nx/playwright     : 19.3.2
@nx/react          : 19.3.2
@nrwl/tao          : 19.3.2
@nx/web            : 19.3.2
@nx/webpack        : 19.3.2
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/next/plugin
@nx/jest/plugin
@nx/eslint/plugin
@nx/playwright/plugin

Failure Logs

npx nx build orders-clients-store --verbose
[NX CLOUD] Verifying current cloud bundle
[NX CLOUD] A local bundle currently exists:  {
  version: '2406.29.1',
  fullPath: '/Users/luis/projects/playerasdememes.com/.nx/cache/cloud/2406.29.1'
}
[NX CLOUD] Last verification was within the past 30 minutes, will not verify this time
[NX CLOUD] Done:  /Users/luis/projects/playerasdememes.com/.nx/cache/cloud/2406.29.1
[Nx Cloud Debug] Nx invoked by runner, skipping lock acquisition
[Nx Cloud] Unable to detect a VCS context from the environment.

 NX   RunStart


{
  "meta": {},
  "branch": null,
  "runGroup": "ee08ecf3b81615fca806e5d1374cd995edd696bf",
  "ciExecutionId": null,
  "ciExecutionEnv": "",
  "hashes": [
    "17009004496805467346"
  ],
  "machineInfo": {
    "machineId": "zqpW3hRFqpLhySRjh4WJxA==",
    "platform": "darwin",
    "version": "Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000",
    "cpuCores": 8
  },
  "vcsContext": null,
  "clientInstanceSource": "CLOUD_RUNNER",
  "clientInstanceId": "a64778ff-2e76-41db-99da-caaa1e23619f"
}

RunStart duration: 173

 NX   Nx Cloud: Cache miss 17009004496805467346.


> nx run orders-clients-store:build:production


 NX   ENOENT: no such file or directory, scandir 'orders/clients/store/public'


Error: ENOENT: no such file or directory, scandir 'orders/clients/store/public'
    at readdirSync (node:fs:1508:26)
    at checkPublicDirectory (/Users/luis/projects/playerasdememes.com/node_modules/@nx/next/src/executors/build/lib/check-project.js:8:36)
    at buildExecutor (/Users/luis/projects/playerasdememes.com/node_modules/@nx/next/src/executors/build/build.impl.js:21:46)
    at runExecutorInternal (/Users/luis/projects/playerasdememes.com/node_modules/nx/src/command-line/run/run.js:106:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/luis/projects/playerasdememes.com/node_modules/nx/src/command-line/run/run.js:187:44
    at async handleErrors (/Users/luis/projects/playerasdememes.com/node_modules/nx/src/utils/params.js:9:24)
    at async process.<anonymous> (/Users/luis/projects/playerasdememes.com/node_modules/nx/bin/run-executor.js:59:28)

———————————————————————————————————————————————————————————————————

 NX   Running target build for project orders-clients-store failed

Failed tasks:

- orders-clients-store:build:production

Hint: run the command with --verbose for more details.


 NX   Storing terminal outputs for orders-clients-store:build:production with hash 17009004496805467346

View structured, searchable error logs at https://nx.app/runs/c0tF2CTGkL

Package Manager Version

10.8.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I tried resetting nx, regenerating access token for NX, uninstalling and reinstalling, re-running nx init, and even creating a new app, which initially seems to work, and if I'm careful I can migrate the components and pages of the app and make it work, but as soon as I rename it doesn't work, the other thing i suspect is the target definitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant