serve and build commands failed after updating to Nx 15
See original GitHub issueCurrent 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:
- Created 10 months ago
- Comments:9 (3 by maintainers)
Current workaround is to not use
next-compose-plugins
and chain the plugins manually, like:Fix will be in the next patch release. https://github.com/nrwl/nx/pull/13358
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)