Skip to content

tns migrate does not update @ngtools/webpack #4876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rosen-vladimirov opened this issue Jul 17, 2019 · 0 comments
Closed

tns migrate does not update @ngtools/webpack #4876

rosen-vladimirov opened this issue Jul 17, 2019 · 0 comments
Assignees
Labels
bug migrate Describes issues related to migrate command severity: critical
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.0.0
  • Cross-platform modules: 5.2.0
  • Android Runtime: 5.2.0
  • iOS Runtime: 5.2.0
  • Plugin(s):
"dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/http": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "nativescript-angular": "~7.2.1",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.12",
    "rxjs": "~6.3.0",
    "tns-core-modules": "~5.2.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~7.2.0",
    "@nativescript/schematics": "~0.5.0",
    "@ngtools/webpack": "~7.2.0",
    "nativescript-dev-typescript": "~0.8.0",
    "nativescript-dev-webpack": "~0.20.0"
  },

Describe the bug
After using tns migrate for a project with Angular 7, almost all of the dependencies are updated except @angular/compiler-cli and @ngtools/webpack. So trying to build/run the app fails with error:

ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 3.4.5 was found instead.

After applying workaround suggested in #4874, trying to run tns preview or tns build <platform> --env.aot fails with error:

ERROR in : Error: Cannot find module '@ngtools/webpack/src/utils'

To Reproduce

$ tns create myApp --template [email protected]
$ cd myApp
$ tns migrate
$ npm i --save-dev @angular/compiler-cli@~8.0
$ tns preview
// Scan the QR Code - you'll see the error
$ tns prepare <platform> --env.aot # you'll see the error

Expected behavior
After migrate, the project should build successfully.

Additional context
WORKAROUND: npm i --save-dev @angular/compiler-cli@~8.0 @ngtools/webpack@~8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug migrate Describes issues related to migrate command severity: critical
Projects
None yet
Development

No branches or pull requests

3 participants