Nx: Migration from 7 to 8: upgrade stops at TS config files syntactical errors

Created on 30 May 2019  路  6Comments  路  Source: nrwl/nx

_Please make sure you have read the submission guidelines before posting an issue_

Expected Behavior

Update to current version ends witthout erros:

npm run update

Current Behavior

The update stops with errors:

TypeScript project "apps/{REDACTED}}/tsconfig.app.json" has syntactical errors which could cause an incomplete migration. Please fix the following failures and rerun the migration:
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,50): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,53): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,54): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,56): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,62): error TS1005: ';' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,63): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,74): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,5): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,38): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(35,1): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,46): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,49): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,50): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,51): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,52): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,63): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(153,1): error TS1128: Declaration or statement expected.

Migration can be rerun with: "ng update @angular/core --from 7 --to 8 --migrate-only"


TypeScript project "libs/{REDACTED}/tsconfig.spec.json" has syntactical errors which could cause an incomplete migration. Please fix the following failures and rerun the migration:
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,50): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,53): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,54): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,56): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,62): error TS1005: ';' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,63): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,74): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,5): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,38): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(35,1): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,46): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,49): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,50): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,51): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,52): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,63): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(153,1): error TS1128: Declaration or statement expected.

Migration can be rerun with: "ng update @angular/core --from 7 --to 8 --migrate-only"


TypeScript project "apps/{REDACTED}/tsconfig.spec.json" has syntactical errors which could cause an incomplete migration. Please fix the following failures and rerun the migration:
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,50): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,53): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,54): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,56): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,62): error TS1005: ';' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,63): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(33,74): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,5): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(34,38): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.collection.d.ts(35,1): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,46): error TS1005: ']' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,49): error TS1005: '>' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,50): error TS1131: Property or signature expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,51): error TS1109: Expression expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,52): error TS1128: Declaration or statement expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(152,63): error TS1005: '(' expected.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(153,1): error TS1128: Declaration or statement expected.

What is the current behavior?

n/a

Failure Information (for bugs)

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. navigate to project root
  2. issue npm run update

Context

Please provide any relevant information about your setup:

  • version of Nx used: 7.8.6
  • version of Angular CLI used (7.2.*)

Other

This is on the Windows OS box.
I'll try the upgrade on the *nix box later

third-party bug

All 6 comments

I saw this also. After messing around, I believe that I resolved it by updating angular/cli first via ng update @angular/cli and then doing npm run update after.

Thank you for reporting this.

This is a complex issue due to how schematics work but we're working with the CLI team to find a fix.

In the meantime, please try yarn update @angular/core which will run ng update @nrwl/schematics @angular/core under the hood. Please let me know if this solves it for you so I can update our documentation and blog post etc..

Will do this, thx!

@FrozenPandaz
It worked, I've run via NPM:

npm run update @angular/core

and it migrated the workspace to the point I could immediately run build after the migration ends.
I've used the same Windows box setup.

@jamesgroat
Thanks! I didn't tried this part, following the @FrozenPandaz comment first. Still appreciated!

@FrozenPandaz
Fill free to close or let open for reference
Thanks!

Awesome! This issue is also fixed for good so @angular/core isn't required anymore 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasedwards picture jasedwards  路  3Comments

zachnewburgh picture zachnewburgh  路  3Comments

markphip picture markphip  路  3Comments

elliotmendiola picture elliotmendiola  路  3Comments

jon301 picture jon301  路  3Comments