Parsing of nx args during build errors out
See original GitHub issueI just upgraded my mono repo from lerna 4.0 to lerna 6.1.0.
I’m not sure where this issue is but based on the stacktrace it appears like the issue is when args are being parsed and transformed into NxArgs
.
When I try to run a build I get the following error:
erna ERR! Error: No projects matching: e
lerna ERR! at projectsToRun (C:\Projects\ePact\frontendMonoRepo\node_modules\nx\src\command-line\run-many.js:56:23)
lerna ERR! at C:\Projects\ePact\frontendMonoRepo\node_modules\nx\src\command-line\run-many.js:24:26
lerna ERR! at Generator.next (<anonymous>)
lerna ERR! at fulfilled (C:\Projects\ePact\frontendMonoRepo\node_modules\tslib\tslib.js:114:62)
lerna ERR! lerna No projects matching: e
error Command failed with exit code 1.
And on further investigation, I updated the projectsToRun
method in the run-many.js
file, I found out when do a console.log of the nxArgs
, it prints the following:
{
projects: 'epact-dashboards-front-end,cico-portal-app,@epact/api,@epact/common,@epact/locales,@epact/theme,@epact/ui',
outputStyle: 'dynamic',
parallel: 12,
nxBail: true,
nxIgnoreCycles: true,
skipNxCache: false,
verbose: undefined,
__overrides__: [],
targets: [ 'build' ]
}
The above log indicates the projects are not being parsed into an array, which I think seems to be the issue here. When I hardcode the project names with the following, the build works:
nxArgs.projects = ['epact-dashboards-front-end', 'cico-portal-app', '@epact/api', '@epact/common', '@epact/locales', '@epact/theme', '@epact/ui'];
Issue Analytics
- State:
- Created 9 months ago
- Reactions:3
- Comments:8
Top GitHub Comments
A workaround that’s working for me is to pin the version of nx to version 15.3.3
Hi Folks, really sorry about this one, I have a PR up to fix it.
We will make sure we come up with a cross project testing strategy in the new year to ensure that these kinds of issues do not occur in future