nx: NX 10 upgrade error: Root tsconfig.json does not exist

Current Behavior

When running through the nx update process to v10, I experience an error when running yarn nx migrate --run-migrations=migrations.json

➜  rx-store git:(feature/nx-10-upgrade) ✗ yarn nx migrate --run-migrations=migrations.json
yarn run v1.22.4
$ nx migrate --run-migrations=migrations.json
Running migration @nrwl/workspace:add-default-branch-to-nx-json
Successfully finished @nrwl/workspace:add-default-branch-to-nx-json
---------------------------------------------------------
Running migration @nrwl/workspace:solution-tsconfigs
Root tsconfig.json does not exist
/Volumes/Development/rx-store/node_modules/yargs/yargs.js:1109
      else throw err
           ^

Error: Command failed: ./node_modules/.bin/tao migrate --run-migrations=migrations.json
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at Object.handler (/Volumes/Development/rx-store/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:77:21)
    at Object.runCommand (/Volumes/Development/rx-store/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/Volumes/Development/rx-store/node_modules/yargs/yargs.js:1022:30)
    at Object.get [as argv] (/Volumes/Development/rx-store/node_modules/yargs/yargs.js:965:21)
    at Object.initLocal (/Volumes/Development/rx-store/node_modules/@nrwl/cli/lib/init-local.js:24:13)
    at Object.<anonymous> (/Volumes/Development/rx-store/node_modules/@nrwl/cli/bin/nx.js:12:18)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 10275,
  stdout: null,
  stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior

The migration to successfully run.

Steps to Reproduce

https://github.com/rx-store/rx-store/tree/feature/nx-10-upgrade

git clone https://github.com/rx-store/rx-store
git checkout feature/nx-10-upgrade
yarn nx migrate --run-migrations=migrations.json

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

Environment

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (3 by maintainers)

Most upvoted comments

The workaround we have is to restore the tsconfig.json and put the following content:

{
    "extends": "./tsconfig.base.json"
}

Anyway, the migration tool corrupts the projects, so needs some fixes I think.

yes same here … also the workaround above to create a new tsconfig and extend baseline … does not work due second step of migration is to delete the tsconfig… making it circular … needs to be fixed in order to run migration