nx
nx copied to clipboard
Error: unknown option '--verbose=true' when running nx affected --verbose --target=...
According to nx affected --help there is the --verbose option
user@DESKTOP-O7MCMUT:~/workspace/nuxt3-multi-page$ nx affected --help
nx affected
Run target for affected projects
Run command using --base=[SHA1] (affected by the committed, uncommitted and untracked changes):
--base Base of the current branch (usually main) [string]
or using --base=[SHA1] --head=[SHA2] (affected by the committed changes):
--base Base of the current branch (usually main) [string]
--head Latest commit of the current branch (usually HEAD) [string]
or using:
--files Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas [array]
--uncommitted Uncommitted changes [boolean]
--untracked Untracked changes [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--target Task to run for affected projects [string] [required]
--parallel Max number of parallel processes [default is 3] [string]
--output-style Defines how Nx emits outputs tasks logs [string] [choices: "dynamic", "static", "stream", "stream-without-prefixes"]
--all All projects [boolean]
--exclude Exclude certain projects from being processed [array] [default: []]
--runner This is the name of the tasks runner configured in nx.json [string]
--skip-nx-cache Rerun the tasks even when the results are available in the cache [boolean] [default: false]
--configuration This is the configuration to use when performing tasks on projects [string]
--only-failed Isolate projects which previously failed [deprecated: The command to rerun failed projects will appear if projects fail. This now does nothing and will be removed in v15.] [boolean] [default: false]
--verbose Print additional error stack trace on failure
--nx-bail Stop command execution after the first failed task [boolean] [default: false]
--nx-ignore-cycles Ignore cycles in the task graph [boolean] [default: false]
Examples:
affected --target=custom-target Run custom target for all affected projects
affected --target=test --parallel=5 Run tests in parallel
affected --target=test --all Run the test target for all projects
affected --target=test --files=libs/mylib/src/index.ts Run tests for all the projects affected by changing the index.ts file
affected --target=test --base=main --head=HEAD Run tests for all the projects affected by the changes between main and HEAD (e.g., PR)
affected --target=test --base=main~1 --head=main Run tests for all the projects affected by the last commit on main
Find more information and examples at https://nx.dev/cli/affected
Current Behavior
Verbose cannot be used, although it should be available. Failing application is NX-specific and works when triggering the build script without NX
Expected Behavior
--verbose option to work, if it is in the docs. Crucial to reproduce errors
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
package.json
{
"private": true,
"name": "second-app",
"version": "0.0.1",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"netlify-deploy": "NITRO_PRESET=netlify nuxi build;DEBUG=* netlify deploy"
},
"dependencies": {
},
"devDependencies": {
"@nuxtjs/tailwindcss": "^5.1.3"
},
"nx": {
"targets": {
"build": {
"outputs": [
"apps/second-app/dist",
"apps/second-app/.output"
]
}
}
}
}
Failure Logs
However, using it produces
ℹ Merging Tailwind config from ~/tailwind.config.js
ℹ Vite client warmed up in 1076ms
ℹ Client built in 2942ms
ℹ Building server...
✔ Server built in 986ms
✔ Generated public dist
ℹ Initializing prerenderer
ℹ Prerendering 1 routes
├─ /blog (111ms)
start Building server...
start Writing server bundle...
✔ Server built
├─ .netlify/functions-internal/server/server.ts.map (103 B) (98 B gzip)
├─ .netlify/functions-internal/server/server.ts (328 B) (202 B gzip)
├─ .netlify/functions-internal/server/package.json (697 B) (317 B gzip)
├─ .netlify/functions-internal/server/chunks/posts.get2.mjs.map (397 B) (218 B gzip)
├─ .netlify/functions-internal/server/chunks/posts.get2.mjs (306 B) (202 B gzip)
├─ .netlify/functions-internal/server/chunks/posts.get.mjs.map (561 B) (251 B gzip)
├─ .netlify/functions-internal/server/chunks/posts.get.mjs (480 B) (257 B gzip)
├─ .netlify/functions-internal/server/chunks/nitro/aws-lambda.mjs.map (15.7 kB) (2.88 kB gzip)
├─ .netlify/functions-internal/server/chunks/nitro/aws-lambda.mjs (12.9 kB) (4.16 kB gzip)
├─ .netlify/functions-internal/server/chunks/handlers/renderer.mjs.map (1.92 MB) (91.3 kB gzip)
├─ .netlify/functions-internal/server/chunks/handlers/renderer.mjs (431 kB) (98.6 kB gzip)
├─ .netlify/functions-internal/server/chunks/app/server.mjs.map (204 kB) (27.8 kB gzip)
├─ .netlify/functions-internal/server/chunks/app/server.mjs (177 kB) (41 kB gzip)
├─ .netlify/functions-internal/server/chunks/app/client.manifest.mjs.map (2.14 kB) (488 B gzip)
└─ .netlify/functions-internal/server/chunks/app/client.manifest.mjs (2.75 kB) (528 B gzip)
Σ Total size: 5.69 MB (950 kB gzip)
› Error: unknown option '--verbose=true'
› See more help with --help
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Running target "netlify-deploy" failed
Failed tasks:
- second-app:netlify-deploy
- first-app:netlify-deploy
The build fails and I do not see why, and using the verbose option produces the error
Error: unknown option '--verbose=true'
Environment
> NX Report complete - copy this into the issue template
Node : 16.15.1
OS : linux x64
yarn : 3.2.0
nx : 14.4.2
@nrwl/angular : Not Found
@nrwl/cypress : 14.4.2
@nrwl/detox : Not Found
@nrwl/devkit : 14.4.2
@nrwl/eslint-plugin-nx : 14.4.2
@nrwl/express : Not Found
@nrwl/jest : 14.4.2
@nrwl/js : 14.4.2
@nrwl/linter : 14.4.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : 14.4.2
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.4.2
@nrwl/web : 14.4.2
@nrwl/workspace : 14.4.2
typescript : 4.7.4
---------------------------------------
Community plugins:
@jscutlery/semver: 2.25.2
@trumbitta/nx-plugin-openapi: 1.11.0
@trumbitta/nx-plugin-unused-deps: 1.11.0
Same problem, but with the run command https://github.com/nrwl/nx/issues/11023 Am I doing something completely wrong or is this option really missing across the board?
I'm pretty sure there error here is actually coming from netlify rather than nx.
From my command line:
➜ ~ npx netlify-cli --verbose=true
› Error: unknown option '--verbose=true'
› See more help with --help
I am seeing the same issue with cucumber-js complaining about --verbose=true. The problem here is that nx is trying to pass that --verbose flag into other tools that do not support it, and unfortunately fail when faced with it.
No, @flowjo-lukej , it's an error of nx. I’ve got it from Playwright, and PW definitely supports “--verbose”.
@e-oz https://playwright.dev/docs/debug-selectors#verbose-api-logs
Playwright supports verbose logging through a DEBUG env, but not through a --verbose flag. This is easy to check.
➜ ~ npx playwright --verbose
error: unknown option '--verbose'
and why do you think that I’m calling it not in debug mode and without the “test” command? Ridiculous.
➜ ~ npx playwright test --verbose
error: unknown option '--verbose'
I don't know what you're running, but I know that it's not working. Perhaps you could share so we can get to the bottom of it?
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.