Skip to content
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

Loading wrong file on file changes #2

Closed
Rush opened this issue Nov 3, 2021 · 3 comments
Closed

Loading wrong file on file changes #2

Rush opened this issue Nov 3, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Rush
Copy link

Rush commented Nov 3, 2021

First time build seems to run fine, but on file changes a wrong file seems to be recompiled giving me cryptic angular errors

ERROR in src/app/components/manage-page.component.pug:1:4603 - error TS2339: Property 'editorLimit' does not exist on type 'ManagePageComponent'.

1 <div class="editor" #editorDiv [class.full]="hideUI" [class.has-bottom]="showSequence" preventTouch><editor-view [class.ha

and then the code shown actually concerns a different file altogether.

@webdiscus
Copy link
Owner

First time build seems to run fine, but on file changes a wrong file seems to be recompiled giving me cryptic angular errors

ERROR in src/app/components/manage-page.component.pug:1:4603 - error TS2339: Property 'editorLimit' does not exist on type 'ManagePageComponent'.

1 <div class="editor" #editorDiv [class.full]="hideUI" [class.has-bottom]="showSequence" preventTouch><editor-view [class.ha

and then the code shown actually concerns a different file altogether.

Can you please show the code snippet with issue in pug file?
Before analyzing the error, I must be able to reproduce it.

@webdiscus
Copy link
Owner

webdiscus commented Nov 13, 2021

First time build seems to run fine, but on file changes a wrong file seems to be recompiled giving me cryptic angular errors

ERROR in src/app/components/manage-page.component.pug:1:4603 - error TS2339: Property 'editorLimit' does not exist on type 'ManagePageComponent'.

1 <div class="editor" #editorDiv [class.full]="hideUI" [class.has-bottom]="showSequence" preventTouch><editor-view [class.ha

and then the code shown actually concerns a different file altogether.

Exact the error TS2339 can I reproduce local if in template is used a angular variable not defined (or private
) property/method in a Component Class.

For example:

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  styleUrls: ['./app.component.css'],
  templateUrl: './app.component.pug',
})
export class AppComponent {
  myCssClass = 'my-css-class';
}

app.component.pug

#myDiv([class]="myCssClass") some text...

This work, but if to delete the property myCssClass in the class AppComponent then appear this error TS2339 .

Perhaps, you should check whether the property editorLimit exists in the class ManagePageComponent.
Without a code snippet I can't reproduce your problem.

@Rush
Copy link
Author

Rush commented Nov 23, 2021

Issue no longer happening with the latest version and with the html mode.

@Rush Rush closed this as completed Nov 23, 2021
@webdiscus webdiscus added the question Further information is requested label Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants