angular / angular-update-guide

An interactive guide to updating the version of Angular in your apps

Home Page:https://update.angular.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular update procedure is failing

PostalMike opened this issue · comments

commented

This issue is resolved.

Cause was having forced TS Version to latest when the update process flow will only evidently work with 4.8.2.

Once this version was specifically set, then declaring @use variables in SCSS files resolved everything else.

This issue can be closed.

============ 30 Nov 2023 above this line ==============

I'm following the procedure at this URL:

There are many errors such as:

./src/styles.scss?ngGlobalStyle - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Can't find stylesheet to import. ╷ 2 │ @import "~@progress/kendo-theme-bootstrap/dist/all.scss"; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ src\styles.scss 2:9 root stylesheet

When one error is handled many others come up. For the file .../src/styles.scss I had to move several rules after all @use rules. Once many of these and other errors are taken care of then rules from the _base.scss start failing. This one flags as an undeclared variable:

`// <-Site font->

  • {
    font-family: $main-font !important;
    }
    `
    Perhaps replacing all @import rules with @use , which is recommended at this SO article introduces breaking changes but @use is supposed to replace @import. When I started the upgrade to Angular 15, the @import rules were an issue.

I'm totally new to SASS but I believe the upgrade procedure, what with @import being deprecated and @use taking its place, may have broken the procedure?

Thanks for any help.

I put in an SO post, it was recommended there to upgrade Kendo. Many version 8.x packages and earlier were updated to 14.x but this did not fix the issue. Upon running npm start, got the same compile errors.

commented

This issue is resolved.

Cause was having forced TS Version to latest when the update process flow will only evidently work with 4.8.2.

Once this version was specifically set, then declaring @use variables in SCSS files resolved everything else.

This issue can be closed.