Open vrxj81 opened 2 years ago
Seconding this, started getting this error after updating to nx 14:
"firebase": {
"executor": "@nxtend/firebase:firebase",
},
> nx run solui:firebase --cmd="deploy -P staging --token=*******************************************************************************************************"
Cannot read properties of undefined (reading 'length')
"@angular/core": "14.0.1",
"@nrwl/workspace": "14.3.1",
"@nxtend/firebase": "12.1.0",
"firebase": "9.8.3",
Seconding this, started getting this error after updating to nx 14:
"firebase": { "executor": "@nxtend/firebase:firebase", },
> nx run solui:firebase --cmd="deploy -P staging --token=*******************************************************************************************************" Cannot read properties of undefined (reading 'length')
Thanks for confirming my suspicion. It worked with NX 14.1, but not with 14.3.
Is there a transparency on the status of supporting NX 14?
https://github.com/nrwl/nx/commit/5c49345c34975fcb6c32c47ec233a28d0154a17f
This commit seems to be the culprit. They are adding __unparsed__
as a required parameter to run-commands
.
See dummy pull request below
For now, reverting to nx 14.2.x solves this issue. I've also opened an issue in nx: https://github.com/nrwl/nx/issues/10750
Nx has fixed this
Nx has fixed this
Nope :(
I upgraded Nx to 14.3.5, the __unparsed__
bug may be fixed but not the Cannot read properties of undefined (reading 'length')
one.
I don't think it's related.
Apparently this was fixed in PR https://github.com/nrwl/nx/pull/10753 and then reverted in commit https://github.com/nrwl/nx/commit/d68b9bbc9094829adcc9431bdcf0c5e08980a83a
Is anyone working on a fix? Tried every version since 14 and none worked.
You can use this patch here. Git, pnpm@7.4 (below) and yarn supports patching node modules.
{
"pnpm": {
"patchedDependencies": {
"nx@14.3.6": "patches/nx@14.3.6.patch"
}
}
}
diff --git a/src/executors/run-commands/run-commands.impl.js b/src/executors/run-commands/run-commands.impl.js
index d2c45a4405755b63e541b060f0e7631781f33b9c..052e0a4c172454d8c3cfae567739baa5fc1e3be6 100644
--- a/src/executors/run-commands/run-commands.impl.js
+++ b/src/executors/run-commands/run-commands.impl.js
@@ -190,7 +190,7 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
return command.replace(regex, (_, group) => opts.parsedArgs[group]);
}
else if (forwardAllArgs) {
- return `${command}${opts.__unparsed__.length > 0 ? ' ' + opts.__unparsed__.join(' ') : ''}`;
+ return `${command}${opts.__unparsed__?.length > 0 ? ' ' + opts.__unparsed__.join(' ') : ''}`;
}
else {
return command;
These plugins are moving over to the Nxext repo, and an Nx 14 version has been released. There are some migration guides on their docs site, here's a link to the Ionic Angular guide: https://nxext.dev/docs/ionic-angular/migrating-from-nxtend.html
@devinshoemaker Thanks! :)
It is still present in the NX15 version ... Is there really a chance to fix this as builds are failing with this issue since Nx14 version ?
NX Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at interpolateArgsIntoCommand (/Users/f1ght4fun/node_modules/nx/src/executors/run-commands/run-commands.impl.js:193:47)
at /Users/f1ght4fun/node_modules/nx/src/executors/run-commands/run-commands.impl.js:106:21
at Array.forEach (
Whenever running any Capacitor related command, I get this output:
No idea how to debug this