ng serve error after uninstalling and installing vsCode's Angular Language Service extension

64 Views Asked by At

`I had to change the version of Angular Language Service from 17.2.0 to 17.1.1 because of the error

 ** Property 'ɵunwrapWritableSignal' does not exist on type
    'typeof import("c:/ecommerce-project/03-frontend/anglar-ecommerce/node_modules/@angular/core/index")'.ngtsc(2339)**

the error disappeared but another error occurred during the build :

✔ Browser application bundle generation complete.

Initial Chunk Files   | Names         |  Raw Size
vendor.js             | vendor        |   2.39 MB |
styles.css, styles.js | styles        | 433.75 kB |
polyfills.js          | polyfills     | 333.18 kB |
main.js               | main          |  34.92 kB |
runtime.js            | runtime       |   6.53 kB |

                      | Initial Total |   3.18 MB

Build at: 2024-02-18T13:46:25.984Z - Hash: 7fd48ec9cfc99a95 - Time: 48711ms

./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'C:\ecommerce-project\03-frontend\anglar-ecommerce\node_modules\@ng-bootstrap\ng-bootstrap\fesm2022\ng-bootstrap.mjs: This application depends upon a library published using Angular version 17.0.0, which requires Angular version 17.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
  1079 |     }
  1080 |     static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0", ngImport: i0, type: NgbAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
> 1081 |     static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.0", type: NgbAlert, isStandalone: true, selector: "ngb-alert", inputs: { animation: "animation", dismissible: "dismissible", type: "type" }, outputs: { closed: "closed" }, host: { attributes: { "role": "alert" }, properties: { "class": "\"alert show\" + (type ? \" alert-\" + type : \"\")", "class.fade": "animation", "class.alert-dismissible": "dismissible" } }, exportAs: ["ngbAlert"], ngImport: i0, template: `
       |                          ^
  1082 |                <ng-content />
  1083 |                @if (dismissible) {
  1084 |                        <button'

Error: node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input-config.d.ts:3:25 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

3 import { Options } from '@popperjs/core';
                          ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.d.ts:156:45 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

156     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.d.ts:156:91 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

156     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                                                              ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown-config.d.ts:1:25 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

1 import { Options } from '@popperjs/core';
                          ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.d.ts:118:45 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

118     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/dropdown/dropdown.d.ts:118:91 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

118     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                                                              ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/popover/popover-config.d.ts:2:25 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

2 import { Options } from '@popperjs/core';
                          ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/popover/popover.d.ts:63:45 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

63     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>; 
                                               ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/popover/popover.d.ts:63:91 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

63     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>; 
                                                                                             ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/tooltip/tooltip-config.d.ts:2:25 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

2 import { Options } from '@popperjs/core';
                          ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/tooltip/tooltip.d.ts:48:45 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

48     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>; 
                                               ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/tooltip/tooltip.d.ts:48:91 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

48     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>; 
                                                                                             ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead-config.d.ts:2:25 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

2 import { Options } from '@popperjs/core';
                          ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.d.ts:120:45 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

120     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.d.ts:120:91 - error TS2307: Cannot find module '@popperjs/core' or its corresponding type declarations.

120     popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;                                                                                              ~~~~~~~~~~~~~~~~


Error: node_modules/@ng-bootstrap/ng-bootstrap/util/positioning.d.ts:1:55 - error TS2307: Cannot find module '@popperjs/core' or its 
corresponding type declarations.
Error: node_modules/@ng-bootstrap/ng-bootstrap/util/positioning.d.ts:1:55 - error TS2307: Cannot find module '@popperjs/core' or its 
corresponding type declarations.

1 import { Placement as PopperPlacement, Options } from '@popperjs/core';
                                                        ~~~~~~~~~~~~~~~~

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


× Failed to compile.

what exactly is the problem even though it worked perfectly (I uninstalled and installed the extension but the problem is still the same)

1

There are 1 best solutions below

1
Sehili Ines On
  • I deleted the node_modules folder , then I run npm install after deleting "@ng-bootstrap/ng-bootstrap": "^16.0.0", from package.json than npm i @ng-bootstrap/ng-bootstrap --legacy-peer-deps and then ng update @angular/cli @angular/core --allow-dirty