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.

serve and build commands failed after updating to Nx 15

See original GitHub issue

Current Behavior

only one application can’t be run locally, nx serve kartebuch failed

Expected Behavior

run all applications locally

Steps to Reproduce

The repo is private and can’t share the PR currently.

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

The "path" argument must be of type string. Received undefined

Environment

Node : 16.17.0 OS : win32 x64 npm : 7.6.3

nx : 15.0.13 @nrwl/angular : Not Found @nrwl/cypress : 15.0.13 @nrwl/detox : Not Found @nrwl/devkit : 15.0.13 @nrwl/esbuild : Not Found @nrwl/eslint-plugin-nx : 15.0.13 @nrwl/expo : Not Found @nrwl/express : Not Found @nrwl/jest : 15.0.13 @nrwl/js : 15.0.13 @nrwl/linter : 15.0.13 @nrwl/nest : Not Found @nrwl/next : 15.0.13 @nrwl/node : 15.0.13 @nrwl/nx-cloud : 15.0.2 @nrwl/nx-plugin : Not Found @nrwl/react : 15.0.13 @nrwl/react-native : Not Found @nrwl/rollup : 15.0.13 @nrwl/schematics : Not Found @nrwl/storybook : 15.0.13 @nrwl/web : 15.0.13 @nrwl/webpack : 15.0.13 @nrwl/workspace : 15.0.13 typescript : 4.8.4

Debug log

1 info using npm@7.6.3 2 info using node@v16.17.0 3 timing config:load:defaults Completed in 2ms 4 timing config:load:file:C:\Users\alilo\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms 5 timing config:load:builtin Completed in 4ms 6 timing config:load:cli Completed in 1ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:C:\Users\alilo\Projects\green-menus.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:C:\Users\alilo.npmrc Completed in 1ms 11 timing config:load:user Completed in 1ms 12 timing config:load:file:C:\Users\alilo\AppData\Roaming\npm\etc\npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 1ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 11ms 19 verbose npm-session 158a473615dcfc08 20 timing npm:load Completed in 20ms 21 timing command:run Completed in 8046ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess.<anonymous> (C:\Users\alilo\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\index.js:64:27) 22 verbose stack at ChildProcess.emit (node:events:513:28) 22 verbose stack at maybeClose (node:internal/child_process:1093:16) 22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) 23 verbose pkgid green-menus@0.0.0 24 verbose cwd C:\Users\alilo\Projects\green-menus 25 verbose Windows_NT 10.0.22621 26 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Users\alilo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “run” “d:1” 27 verbose node v16.17.0 28 verbose npm v7.6.3 29 error code 1 30 error path C:\Users\alilo\Projects\green-menus 31 error command failed 32 error command C:\WINDOWS\system32\cmd.exe /d /s /c nx serve kartebuch 33 verbose exit 1

workspace.json for the failed application.

{
"projects": {
"kartebuch": {
      "$schema": "../../node_modules/nx/schemas/project-schema.json",
      "root": "apps/kartebuch",
      "sourceRoot": "apps/kartebuch",
      "projectType": "application",
      "targets": {
        "build": {
          "executor": "@nrwl/next:build",
          "outputs": ["{options.outputPath}"],
          "defaultConfiguration": "production",
          "options": {
            "root": "apps/kartebuch",
            "outputPath": "dist/apps/kartebuch"
          },
          "configurations": {
            "production": {
              "buildTarget": "kartbuch:build:production",
              "dev": false
            },
            "development": {
              "outputPath": "apps/kartebuch"
            }
          }
        },
        "serve": {
          "executor": "@nrwl/next:server",
          "options": {
            "buildTarget": "kartebuch:build",
            "dev": true,
            "port": 3000,
            "hostname": "localhost"
          },
          "configurations": {
            "production": {
              "buildTarget": "kartebuch:build:production",
              "dev": false
            },
            "development": {
              "buildTarget": "kartebuch:build:development",
              "dev": true
            }
          },
          "defaultConfiguration": "development"
        },
        "export": {
          "executor": "@nrwl/next:export",
          "options": {
            "buildTarget": "kartebuch:build:production"
          }
        },
        "test": {
          "executor": "@nrwl/jest:jest",
          "outputs": ["{workspaceRoot}/coverage/apps/kartebuch"],
          "options": {
            "jestConfig": "apps/kartebuch/jest.config.ts",
            "passWithNoTests": true
          }
        },
        "lint": {
          "executor": "@nrwl/linter:eslint",
          "outputs": ["{options.outputFile}"],
          "options": {
            "lintFilePatterns": ["apps/kartebuch/**/*.{ts,tsx,js,jsx}"]
          }
        }
      },
      "tags": [],
      "name": "kartebuch"
    }
} 
}

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jaysoocommented, Nov 23, 2022

Current workaround is to not use next-compose-plugins and chain the plugins manually, like:

module.exports = withNx(withTranslate({ ... }));

Fix will be in the next patch release. https://github.com/nrwl/nx/pull/13358

1reaction
vladIsLove-hubcommented, Nov 20, 2022

No, I dont have such plugin 😃 Just I’ve tried run the built-in NX webpack devserver executor, and I have the same error. In general I assume that it happen in several built-in NX executors and I don’t like it, when the whole Nx command even can’t test their code (just facepalm)

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run nx serve fails after creating empty workspace, adding ...
Open a new PowerShell window · Run npx create-nx-workspace nxtest · Choose the 'empty' template and the 'Angular CLI' option for the CLI...
Read more >
Why am i getting error on using any `nx` commands
Just had this issue myself. Fixed it by deleting all my node_modules, verifying npm cache, updating my global @nrwl-cli, and reinstalling.
Read more >
Automate Updating Dependencies - Nx
The installed dependencies are updated including the package.json (and node_modules ). · The source code in the repo is updated to match the...
Read more >
Update Angular to v15
Angular v15 brings many improvements and new features. ... the compiler can report an error when that constructor cannot be used for dependency...
Read more >
Fixing Could not find module @angular-devkit/build-angular ...
To fix Could not find module angular-devkit-build-angular error in Angular follow the below steps 1. Delete node_modules folder and run npm ...
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