Unable to run 'update-angular-config-v12' migration
See original GitHub issueCurrent Behavior
Unable to run nx migrate --run-migrations
from Angular 11 to 12.
Migration name = update-angular-config-v12.
Expected Behavior
Run nx migrate --run-migrations
without errors
Steps to Reproduce
We upgarded our nx version from 11.0 to 11.6 without issues. We then upgraded nx from 11.6 to 12.0 without issue. Upgrading from 12.0 to 12.5 introduced the error when running migration update-angular-config-v12
.
Run npm install
Run nx migrate --run-migrations
Yes
I get a 403 when trying to push a branch up: remote: Permission to nrwl/nx-examples.git denied to labeled. fatal: unable to access ‘https://github.com/nrwl/nx-examples.git/’: The requested URL returned error: 403
https://github.com/labeled/nx-examples
Failure Logs
Running migration update-angular-config-v12
PropertyNameExpected in JSON at position 65188
ui\node_modules\yargs\build\lib\yargs.js:1043:55) c.voyager.web-ui\node_modules\yargs\build\lib\yargs.js:1132
at Object.get [as argv] (C:\PIT\Source\Repos\altec.voyager-11\altec.voyager\altec.voyager.web-ui\node_modules\yargs\build\lib\yargs.js:986:25)
at Object.initLocal (C:\PIT\Source\Repos\altec.voyaTemp\tmp-12680-7DyKGaFdpbMG\node_modules\.bin\tao migrate --run-migrationsger-11\altec.voyager\altec.voyager.web-ui\node_modules\@nrwl\cli\lib\init-local.js:25:79)
at Object.<anonymous> (C:\PIT\Source\Repos\altec.vor-11\altec.voyager\altec.voyager.web-ui\node_modules\@nrwl\workspace\src\command-line\nx-commands.js:89:25)yager-11\altec.voyager\altec.voyager.web-ui\node_moduleager-11\altec.voyager\altec.voyager.web-ui\node_modules\yargs\build\lib\command.js:197:48)s\@nrwl\cli\bin\nx.js:43:18) Repos\altec.voyager-11\altec.voyager\altec.voyager.web-ui\node_modules\yargs\build\lib\yargs.js:1043:55)
at Module._compile (internal/modules/cjs/loader.js:voyager-11\altec.voyager\altec.voyager.web-ui\node_modules\yargs\build\lib\yargs.js:986:25)1063:30) ger-11\altec.voyager\altec.voyager.web-ui\node_modules\@nrwl\cli\lib\init-local.js:25:79)
at Object.Module._extensions..js (internal/modules/yager-11\altec.voyager\altec.voyager.web-ui\node_modules\@nrwl\cli\bin\nx.js:43:18)cjs/loader.js:1092:10) { 1063:30)
status: 1, cjs/loader.js:1092:10) {
signal: null,
output: [ null, null, null ],
pid: 5456,
stdout: null,
stderr: null
}
Environment
NX Report complete - copy this into the issue template
Node : 14.16.0 OS : win32 x64 npm : 7.16.0
nx : Not Found @nrwl/angular : 12.5.0 @nrwl/cli : 12.5.0 @nrwl/cypress : 12.5.0 @nrwl/devkit : 12.5.0 @nrwl/eslint-plugin-nx : 12.5.0 @nrwl/express : Not Found @nrwl/jest : 12.5.0 @nrwl/linter : 12.5.0 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 12.5.0 @nrwl/web : Not Found @nrwl/workspace : 12.5.0 @nrwl/storybook : 12.5.0 @nrwl/gatsby : Not Found typescript : 4.2.4
Issue Analytics
- State:
- Created 2 years ago
- Comments:13
FYI a similar error happened to me and the root cause was I had a trailing comma in one of my objects in the angular.json. Removing it fixed the issue.
I found my issue by adding more logs to the place in nx where exception is thrown. IE in the below file you can add more logs like for example logging the
input
object such that you know which object is causing the issue:at Object.parseJson (C:\Users\tlpeters\AppData\Local\Temp\tmp-25916-9dryXxItnHgp\node_modules@nrwl\tao\src\utils\json.js:30:15)