facebook

Moving from PC to Mac :::: TypeError: Cannot read property 'text' of undefined

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #538706 Reply

    CounterReset
    Participant

    Just got handed a new MacBook and in switching over, when running my Angular project on the MacBook, I got this error:

    ERROR in ./src/app/dashboard/inventory/virtual-scroll-list/stb-item/stb-item.component.ts
    Module build failed: TypeError: Cannot read property 'text' of undefined
        at /Users/p2738149/Development/workspace/ast-tools/FE_V2/node_modules/angular-ide/lib/CLUtils.js:70:35
        at Array.forEach (native)
        at /Users/p2738149/Development/workspace/ast-tools/FE_V2/node_modules/angular-ide/lib/CLUtils.js:64:12
        at TypeScriptFileRefactor.TypeScriptFileRefactor (/Users/p2738149/Development/workspace/ast-tools/FE_V2/node_modules/angular-ide/lib/CLUtils.js:120:7)
        at Object.ngcLoader (/Users/p2738149/Development/workspace/ast-tools/FE_V2/node_modules/@ngtools/webpack/src/loader.js:323:26)
     @ ./src/app/dashboard/inventory/inventory.module.ts 22:0-85
     @ ./src/app/dashboard/dashboard.module.ts
     @ ./src/app/app.module.ts
     @ ./src/app/index.ts
     @ ./src/main.ts
     @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

    There was no issue running this code on the PC, but when running it on the MacBook the backticks were not detected. I had to switch to single quotes for templateURL references. Switching them fixed the issue, but it looks like CLUtils.js doesn’t handle backticks (`) well.

    Thoughts on this?

    #538709 Reply

    CounterReset
    Participant

    Here is what I needed to change. There is no error allert that specifies this specifically, but the error is caught where CLUtils is consuming the templateURL of the component

    @Component({
      selector: 'app-virtual-scroll',
      templateUrl: './virtual-scroll.component.html',
      styleUrls: ['./virtual-scroll.component.scss']
    })

    ^^^ This works fine, however…

    @Component({
      selector: 'app-virtual-scroll',
      templateUrl: [BACKTICK]./virtual-scroll.component.html[BACKTICK],
      styleUrls: ['./virtual-scroll.component.scss']
    })

    ^^^ This will blow up. Swap backticks for where [BACKTICK] is placed (forum code designating decorators are backticks).

    • This reply was modified 6 years, 6 months ago by CounterReset.
    • This reply was modified 6 years, 6 months ago by CounterReset.
    • This reply was modified 6 years, 6 months ago by CounterReset.
    #538770 Reply

    support-swapna
    Moderator

    CounterReset,

    Sorry that you are seeing this issue. It is a bug in CodeLive when enabled on the Angular CLI server.
    I have raised a bug for the dev team to fix it. As a workaround, you can disable CodeLive for the angular project in the Servers view.

    Please check this tutorial for detailed instructions to disable CodeLive for angular projects :
    https://www.genuitec.com/docs/web-apps/modern-web/using-codelive-for-angular/

    Thank you for reporting it. We will keep you posted about the fix schedule.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Moving from PC to Mac :::: TypeError: Cannot read property 'text' of undefined

You must be logged in to post in the forum log in