shaukinkhan477 / BenPortfolio

0 stars 1 forks source link

Error when building #8

Open benmed00 opened 1 day ago

benmed00 commented 1 day ago

`$ ng build Prerendered 0 static routes. Application bundle generation failed. [32.398 seconds]

✘ [ERROR] TS1068: Unexpected token. A constructor, method, accessor, or property was expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:61:5:
  61 │     }, 0);
     ╵      ^

✘ [ERROR] TS7008: Member '0' implicitly has an 'any' type. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:61:7:
  61 │     }, 0);
     ╵        ^

✘ [ERROR] TS1005: ';' expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:61:8:
  61 │     }, 0);
     ╵         ^

✘ [ERROR] TS2552: Cannot find name 'onMouseMove'. Did you mean 'onmousemove'? [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:64:2:
  64 │   onMouseMove(event: MouseEvent) {
     ╵   ~~~~~~~~~~~

'onmousemove' is declared here.

node_modules/typescript/lib/lib.dom.d.ts:27873:12:
  27873 │ declare var onmousemove: ((this: Window, ev: MouseEvent) => any...
        ╵             ~~~~~~~~~~~

✘ [ERROR] TS1005: ',' expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:64:19:
  64 │   onMouseMove(event: MouseEvent) {
     ╵                    ^

✘ [ERROR] TS1005: ';' expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:64:33:
  64 │   onMouseMove(event: MouseEvent) {
     ╵                                  ^

✘ [ERROR] TS2532: Object is possibly 'undefined'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:65:18:
  65 │     const image = this.heroImage.nativeElement;
     ╵                   ~~~~

✘ [ERROR] TS18048: 'event' is possibly 'undefined'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:71:17:
  71 │     const xPos = event.clientX - rect.left - rect.width / 2;
     ╵                  ~~~~~

✘ [ERROR] TS2339: Property 'clientX' does not exist on type 'Event'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:71:23:
  71 │     const xPos = event.clientX - rect.left - rect.width / 2;
     ╵                        ~~~~~~~

✘ [ERROR] TS18048: 'event' is possibly 'undefined'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:72:17:
  72 │     const yPos = event.clientY - rect.top - rect.height / 2;
     ╵                  ~~~~~

✘ [ERROR] TS2339: Property 'clientY' does not exist on type 'Event'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:72:23:
  72 │     const yPos = event.clientY - rect.top - rect.height / 2;
     ╵                        ~~~~~~~

✘ [ERROR] TS2552: Cannot find name 'onMouseLeave'. Did you mean 'onmouseleave'? [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:92:2:
  92 │   onMouseLeave() {
     ╵   ~~~~~~~~~~~~

'onmouseleave' is declared here.

node_modules/typescript/lib/lib.dom.d.ts:27866:12:
  27866 │ declare var onmouseleave: ((this: Window, ev: MouseEvent) => an...
        ╵             ~~~~~~~~~~~~

✘ [ERROR] TS1005: ';' expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:92:17:
  92 │   onMouseLeave() {
     ╵                  ^

✘ [ERROR] TS2532: Object is possibly 'undefined'. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:93:18:
  93 │     const image = this.heroImage.nativeElement;
     ╵                   ~~~~

✘ [ERROR] TS1128: Declaration or statement expected. [plugin angular-compiler]

src/app/home-page-sections/hero/hero.component.ts:103:0:
  103 │ }
      ╵ ^

`

image

benmed00 commented 1 day ago

Possible fix :

image

image

image