question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run 'update-angular-config-v12' migration

See original GitHub issue

Current 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:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

3reactions
SergeyChermancommented, Aug 14, 2021

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.

1reaction
SergeyChermancommented, Aug 16, 2021

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide to update your Angular application v11.0 -> v12.0 for ...
Review these changes and perform the actions to update your application. Run ng update @angular/core@12 @angular/cli@12 which should bring you to version 12...
Read more >
Several problems after Angular v11 to v12 upgrade
1 Answer 1 · Visual Studio Code is unable to debug with breakpoints, because the upgrade forced my app into a production-only configuration....
Read more >
Speeding up the development serve after upgrading to ...
To run this migration, run: ng update @angular/cli --migrate-only update-angular-config-v12. One caveat is that it only supports migrating ...
Read more >
Migration Guide | Cypress Documentation
Migrating to Cypress 12.0 This guide details the changes and how ... This can result in certain tests that used to pass could...
Read more >
What's new in Angular CLI 12.0? - Ninja Squad
The CLI now uses Webpack v5 under the hood . There is nothing to do to enjoy it: just update your application to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found