Make nx run more flexible when using script runner workflow
See original GitHub issueCurrent Behavior
After adding Nx to a Lerna repo using add-nx-to-monorepo
I’m unable to run any scripts that have a colon in them.
Example:
{
"name": "packages/my-lib",
"scripts": {
"cypress:open": "cypress open ",
...
}
}
nx run packages/my-lib:cypress:open
Expected Behavior
I would expect that I could run the cypress:open
script using nx run
Steps to Reproduce
- Run
add-nx-to-monorepo
to an existing Lerna workspace - Add a script with a colon in a package’s
package.json
- Call that script with a colon using
nx run
Failure Logs
When you run the command you get the following error:
NX Cannot find target 'cypress' for project
packages/my-lib`
Environment
NX Report complete - copy this into the issue template
Node : 16.13.2 OS : darwin x64 npm : 8.1.2
nx : 14.1.7 @nrwl/angular : Not Found @nrwl/cypress : Not Found @nrwl/detox : Not Found @nrwl/devkit : Not Found @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : Not Found @nrwl/js : Not Found @nrwl/linter : Not Found @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : Not Found @nrwl/web : Not Found @nrwl/workspace : Not Found typescript : 4.4.4 rxjs : 6.6.7
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Deploying Nx Affected Apps from GitHub Actions - Medium
Having multiple apps in a Nx workspace is common and convenient, but when it's time to deploy the apps it can be difficult...
Read more >Support for generic task execution, displaying affecting ...
Nx allows you more flexibility with support for adding generic task runners. You can have default options for running tasks, or custom options...
Read more >Run Tasks | Nx
For more control over the order tasks are executed, edit the Task Pipeline Configuration. To speed up your task execution, learn how to...
Read more >Teamcenter Rapid Start 11.6 SettingUpWorkflows for Product ...
Handlers are essential to designing flexible, complex workflows. Use action handlers to perform all types of digital actions, such as running scripts, ...
Read more >Running Jobs - FASRC DOCS
FASRC cluster nodes run the CentOS distribution of the Linux operating system and commands are run under the “bash” shell. As with most...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AgentEnder The infix target format works but the quotation marks example does not.
I’m going to close this out now for the following reasons:
useNx
flag introduced in lerna v5. Folks can continue running their commands withlerna
.