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.

Running 11.6.0 migrations cause max call stack on create-babelrc-for-workspace-libs-11-5-2

See original GitHub issue

Current Behavior

When running migrations for 11.6.0 (create-babelrc-for-workspace-libs-11-5-2) I get a max call stack error that causes migrations to fail (all other migrations work)

Expected Behavior

migrations do not fail

Steps to Reproduce

migrate workspace from 11.4.0 -> 11.6.0

Failure Logs

>  NX  Running migrations from 'migrations.json'

Running migration create-babelrc-for-workspace-libs-11-5-2
Maximum call stack size exceeded
/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1132
                throw err;
                ^

Error: Command failed: /var/folders/cv/ryn9x0td5jd5dcmv6l2v8qn80000gn/T/tmp-61642vOAFdO3doB7a/node_modules/.bin/tao migrate --run-migrations
    at checkExecSyncError (child_process.js:635:11)
    at Object.execSync (child_process.js:671:15)
    at Object.handler (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:80:25)
    at Object.runCommand (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/command.js:196:48)
    at Object.parseArgs [as _parseArgs] (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1043:55)
    at Object.get [as argv] (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:986:25)
    at Object.initLocal (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/cli/lib/init-local.js:23:13)
    at Object.<anonymous> (/Users/jaybell/WebstormProjects/trellis-mono/node_modules/@nrwl/cli/bin/nx.js:42:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 61650,
  stdout: null,
  stderr: null
}

Environment

>  NX  Report complete - copy this into the issue template

  Node : 12.20.1
  OS   : darwin x64
  yarn : 1.22.10
  
  nx : Not Found
  @nrwl/angular : 11.6.0
  @nrwl/cli : 11.6.0
  @nrwl/cypress : 11.6.0
  @nrwl/devkit : 11.6.0
  @nrwl/eslint-plugin-nx : 11.6.0
  @nrwl/express : 11.6.0
  @nrwl/jest : 11.6.0
  @nrwl/linter : 11.6.0
  @nrwl/nest : 11.6.0
  @nrwl/next : Not Found
  @nrwl/node : 11.6.0
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 11.6.0
  @nrwl/web : 11.6.0
  @nrwl/workspace : 11.6.0
  @nrwl/storybook : 11.6.0
  @nrwl/gatsby : Not Found
  typescript : 4.1.5

✨  Done in 2.28s.

Steps to Reproduce 2

https://github.com/FrozenPandaz/nx-examples/tree/migrate-circular

nx migrate --run-migrations

Failure Logs

jason@pop-os ~/p/nx-examples (migrate-circular)> nx migrate --run-migrations --verbose

NX Running ‘yarn’ to make sure necessary packages are installed

yarn install v1.22.10 [1/4] Resolving packages… success Already up-to-date. $ ngcc --properties es2015 browser module main && node decorate-angular-cli.js

NX Angular CLI has been decorated to enable computation caching.

Done in 1.76s.

NX Running migrations from ‘migrations.json’

Running migration update-11-5-3 products: no storybook configured. skipping migration… products-e2e: no storybook configured. skipping migration… cart: no storybook configured. skipping migration… cart-e2e: no storybook configured. skipping migration… shared-product-types: no storybook configured. skipping migration… shared-product-data: no storybook configured. skipping migration… shared-product-ui: no storybook configured. skipping migration… products-home-page: no storybook configured. skipping migration… cart-cart-page: no storybook configured. skipping migration… shared-e2e-utils: no storybook configured. skipping migration… shared-jsxify: no storybook configured. skipping migration… shared-cart-state: no storybook configured. skipping migration… shared-product-state: no storybook configured. skipping migration… shared-assets: no storybook configured. skipping migration… shared-header: no storybook configured. skipping migration… products-product-detail-page: no storybook configured. skipping migration… shared-styles: no storybook configured. skipping migration… Successfully finished update-11-5-3

Running migration update-root-babel-config-11-5-2 Successfully finished update-root-babel-config-11-5-2

Running migration create-babelrc-for-workspace-libs-11-5-2 Maximum call stack size exceeded RangeError: Maximum call stack size exceeded at Object.get [as DependencyType] (/home/jason/projects/nx-examples/node_modules/tslib/tslib.js:152:76) at /home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:72 at Array.some (<anonymous>) at walk (/home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:29) at /home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:99 at Array.some (<anonymous>) at walk (/home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:29) at /home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:99 at Array.some (<anonymous>) at walk (/home/jason/projects/nx-examples/node_modules/@nrwl/web/src/migrations/update-11-5-2/utils.js:22:29) /home/jason/projects/nx-examples/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1132 throw err; ^

Error: Command failed: /tmp/tmp-110938bW3mO0K7iyCw/node_modules/.bin/tao migrate --run-migrations --verbose at checkExecSyncError (node:child_process:690:11) at Object.execSync (node:child_process:727:15) at Object.handler (/home/jason/projects/nx-examples/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:80:25) at Object.runCommand (/home/jason/projects/nx-examples/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/command.js:196:48) at Object.parseArgs [as _parseArgs] (/home/jason/projects/nx-examples/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1043:55) at Object.get [as argv] (/home/jason/projects/nx-examples/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:986:25) at Object.initLocal (/home/jason/projects/nx-examples/node_modules/@nrwl/cli/lib/init-local.js:23:13) at Object.<anonymous> (/home/jason/projects/nx-examples/node_modules/@nrwl/cli/bin/nx.js:42:18) at Module._compile (node:internal/modules/cjs/loader:1092:14) at Object.Module._extensions…js (node:internal/modules/cjs/loader:1121:10) { status: 1, signal: null, output: [ null, null, null ], pid: 110961, stdout: null, stderr: null }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
FrozenPandazcommented, Mar 30, 2021

Thanks for reporting the issue. I was able to reproduce it on nx-examples.

@jaysoo the migration has an issue when projects that are not dependencies of a @nrwl/web project have a circular dependency. Can you please update the logic to handle this case?

0reactions
JoA-MoScommented, May 3, 2021

@FrozenPandaz - looks like I pulled about 30 mins before it was released, I reran it this afternoon and it worked fine.

I see the PR is tagged in the the release notes but not the issue. It would be awesome if we could also tag the issue with the version it was released in but I do understand how to see if an issue has been released or not now.

Issue has Merged PR and Merged PR is referenced on the release page.

Thanks for all the work

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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