Skip to content

Error when setting tsconfig target to ES6. #30

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

Closed
JeanMeche opened this issue Jun 12, 2019 · 7 comments
Closed

Error when setting tsconfig target to ES6. #30

JeanMeche opened this issue Jun 12, 2019 · 7 comments
Labels
bug Something isn't working common Includes: Common queries, bug and features word-processor Word Processor component

Comments

@JeanMeche
Copy link

I'm getting the following error when I set my tsconfig.json to "target": "es6" :

 Class constructor DocumentEditorContainer cannot be invoked without 'new'
    at new DocumentEditorContainerComponent

That happens when I instanciate a component that uses the Document editor

@RamyaThiru
Copy link

Hi ,

We can reproduce the reported issue with document editor and es 6. This reported problem is a bug in Angular CLI, and we have already reported it to them. For further information, you can refer to the link as below.

Link: angular/angular-cli#14717

We will update you once angular team published the changes and after ensured it in our end. We are not able to give exact timeline since it depends on the angular package publish.

Until then we suggest you use “es5” as target.

Regards,
Ramya T

@kumaresan-subramani
Copy link
Contributor

Hi,

Reported issue got resolved in angular version 8.2.0.

angular/angular-cli#14717

@JeanMeche
Copy link
Author

JeanMeche commented Aug 21, 2019

The problem is not solved for me after updating to 8.2.2

@dskesavan
Copy link

Hi @kyro38 ,

Sorry for the inconvenience caused.

The problem faced when using target as "es6" with latest Angular CLI 8.2.2 requires changes in our packages. Currently we are working to fix the issue and the fix will be available in our upcoming EJ2-Patch release on September 3rd 2019.

Regards,
Kesavan.

@JeanMeche
Copy link
Author

JeanMeche commented Oct 16, 2019

The editor works great when building (debug build) with target ES6 but break on a prod build.

After a prod build it throws the following error : TypeError: Cannot read property 'spellCheck' of undefined

This error is throw from a method named setserverActionSettings

@MugunthanAnbalagan
Copy link

MugunthanAnbalagan commented Oct 26, 2019

Hi @kyro38,

We have tried to replicate the reported issue but unfortunately we are unable to reproduce the issue from our side. So, we suspect this might occurs do to sample code used in your side.

Please find the sample code we have used to replicate the reported issue below.

import { Component, ViewChild } from '@angular/core';
import { ToolbarService, DocumentEditorContainerComponent } from '@syncfusion/ej2-angular-documenteditor';
@Component({
  selector: 'app-root',
  template: '<div><ejs-documenteditorcontainer #documenteditor_default [enableToolbar]=true (created)="created()" style="display:block;height:600px"></ejs-documenteditorcontainer></div>',
  providers: [ToolbarService]
})
export class AppComponent {
  @ViewChild('documenteditor_default', { static: false })
  public container: DocumentEditorContainerComponent;
  public created(): void {
    var settings = { import: 'Import1', systemClipboard: 'SystemClipboard1', spellCheck: 'SpellCheck1', restrictEditing: 'RestrictEditing1' }
    this.container.serverActionSettings = settings;
  }
}

So, kindly share us the sample code and tsconfig used in your project to reproduce the issue in our side which will helpful for us to investigate on it and provide you the appropriate solution at the earliest.

Regards,
Mugunthan A

@ajithr ajithr added bug Something isn't working common Includes: Common queries, bug and features word-processor Word Processor component labels Feb 29, 2020
@ajithr
Copy link
Contributor

ajithr commented Dec 2, 2020

We are closing this thread since there is no recent activity. Feel free to reopen the issue and update your comments for the reinvestigation.

@ajithr ajithr closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working common Includes: Common queries, bug and features word-processor Word Processor component
Projects
None yet
Development

No branches or pull requests

6 participants