sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
424 stars 183 forks source link

[Bug]: Error: Module build filed - despite applying fix from #406 #409

Closed maliakmal closed 1 year ago

maliakmal commented 1 year ago

What happened?

I'm getting the following error all of a sudden after upgrading Angular and using the new version of ngx-editor. This is the error stack I'm getting>

./node_modules/ngx-editor/fesm2015/ngx-editor.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string '/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs: Errors found in the template:
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("p\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">[ERROR ->]{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"of"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1306
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("p\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">[ERROR ->]{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"of"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1306
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div [ERROR ->]*ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n   "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1428
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div [ERROR ->]*ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n   "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1428
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
  1322 | }
  1323 | LinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LinkComponent, deps: [{ token: i0.ElementRef }, { token: NgxEditorService }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component });
> 1324 | LinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: LinkComponent, selector: "ngx-link", host: { listeners: { "document:mousedown": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"NgxEditor__MenuItem--IconContainer\" [class.NgxEditor__MenuItem--Active]=\"isActive || showPopup\"\n  [class.NgxEditor--Disabled]=\"!canExecute\" [innerHTML]=\"icon | sanitizeHtml\" (mousedown)=\"onMouseDown($event)\"\n  [title]=\"title\">\n</div>\n\n<!-- popup -->\n<div *ngIf=\"showPopup\" class=\"NgxEditor__Popup\">\n  <form class=\"NgxEditor__Popup--Form\" [formGroup]=\"form\" (ngSubmit)=\"insertLink($event)\">\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('url')}}</label>\n        <input type=\"href\" id=\"href\" formControlName=\"href\" autofocus autocomplete=\"off\" />\n        <div *ngIf=\"href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div *ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          {{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "sanitizeHtml": SanitizeHtmlPipe } });
       |                                                                                                                                                                                                                                      ^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1325 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LinkComponent, decorators: [{
  1326 |             type: Component,
  1327 |             args: [{ selector: 'ngx-link', template: "<div class=\"NgxEditor__MenuItem--IconContainer\" [class.NgxEditor__MenuItem--Active]=\"isActive || showPopup\"\n  [class.NgxEditor--Disabled]=\"!canExecute\" [innerHTML]=\"icon | sanitizeHtml\" (mousedown)=\"onMouseDown($event)\"\n  [title]=\"title\">\n</div>\n\n<!-- popup -->\n<div *ngIf=\"showPopup\" class=\"NgxEditor__Popup\">\n  <form class=\"NgxEditor__Popup--Form\" [formGroup]=\"form\" (ngSubmit)=\"insertLink($event)\">\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('url')}}</label>\n        <input type=\"href\" id=\"href\" formControlName=\"href\" autofocus autocomplete=\"off\" />\n        <div *ngIf=\"href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div *ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          {{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""] }]'
    at run (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/@babel/core/lib/transformation/index.js:37:15)
    at run.next (<anonymous>)
    at Function.transform (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/@babel/core/lib/transform.js:25:41)
    at transform.next (<anonymous>)
    at step (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:261:32)
    at /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:223:11)
    at /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:37:40

Error: node_modules/prosemirror-model/dist/index.d.ts:1:8 - error TS1259: Module '"/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/orderedmap/dist/index-cjs"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

1 import OrderedMap from 'orderedmap';
         ~~~~~~~~~~

  node_modules/orderedmap/dist/index-cjs.d.ts:31:1
    31 export = OrderedMap
       ~~~~~~~~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Error: src/app/shared/services/custom-http-interseptor.ts:13:37 - error TS2339: Property 'do' does not exist on type 'Observable<HttpEvent<any>>'.

13         return next.handle(request).do((event: HttpEvent<any>) => {
                                       ~~

Error: src/app/shared/services/title.service.ts:21:14 - error TS2339: Property 'filter' does not exist on type 'Observable<Event>'.

21             .filter((event) => event instanceof NavigationEnd)
                ~~~~~~

Error: src/app/shared/token.interceptor.ts:29:9 - error TS2322: Type 'Observable<unknown>' is not assignable to type 'Observable<HttpEvent<any>>'.
  Type 'unknown' is not assignable to type 'HttpEvent<any>'.
    Property 'type' is missing in type '{}' but required in type 'HttpUserEvent<any>'.

 29         return next.handle(req).pipe(
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 30             map(event => {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
 40             }),
    ~~~~~~~~~~~~~~~
 41         );
    ~~~~~~~~~~

  node_modules/@angular/common/http/http.d.ts:3846:5
    3846     type: HttpEventType.User;
             ~~~~
    'type' is declared here.

Error: src/app/shared/token.interceptor.ts:39:35 - error TS2339: Property 'throw' does not exist on type 'typeof Observable'.

39                 return Observable.throw(error);
                                     ~~~~~

This is my package.json file

{
  "name": "pitch-portal",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.5",
    "@alyle/ui": "^10.5.3",
    "@angular-devkit/core": "^14.0.0",
    "@angular-devkit/schematics": "^14.0.0",
    "@angular/animations": "^12.0.5",
    "@angular/cdk": "^12.2.13",
    "@angular/common": "~12.0.5",
    "@angular/compiler": "~12.0.5",
    "@angular/core": "~12.0.5",
    "@angular/forms": "~12.0.5",
    "@angular/material": "^12.0.5",
    "@angular/platform-browser": "~12.0.5",
    "@angular/platform-browser-dynamic": "~12.0.5",
    "@angular/router": "~12.0.5",
    "@ctrl/ngx-emoji-mart": "^0.17.0",
    "@fortawesome/angular-fontawesome": "^0.10.2",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@ng-bootstrap/ng-bootstrap": "^9.1.3",
    "@ng-toolkit/universal": "^7.1.2",
    "@nguniversal/express-engine": "^10.0.0",
    "@ngx-translate/core": "^13.0.0",
    "@ngx-translate/http-loader": "^6.0.0",
    "@toverux/ngx-sweetalert2": "^4.0.0",
    "@typeform/embed": "^1.19.0",
    "@types/jquery": "^3.3.31",
    "@types/socket.io-client": "^1.4.32",
    "@types/underscore": "^1.9.2",
    "add": "^2.0.6",
    "angular-cc-library": "^2.1.2",
    "angular-feather": "^6.0.1",
    "angular-font-awesome": "^3.1.2",
    "angular-ng-autocomplete": "^2.0.5",
    "angular-svg-round-progressbar": "^3.0.1",
    "angular-user-idle": "^2.2.4",
    "angular2-cookie-law": "^7.0.1",
    "angularx-social-login": "^3.5.7",
    "bootstrap": "^5.0.1",
    "chroma-js": "^2.0.3",
    "core-js": "^2.5.4",
    "file-system": "^2.2.2",
    "font-awesome": "^4.7.0",
    "giphy-api": "^2.0.1",
    "hammerjs": "^2.0.8",
    "jquery": "^3.4.1",
    "mat-video": "^2.8.1",
    "moment": "^2.24.0",
    "ng": "0.0.0",
    "ng-multiselect-dropdown": "^0.2.4",
    "ng2-file-upload": "^1.3.0",
    "ng2-interceptors": "^1.3.0-1",
    "ng2-search-filter": "^0.5.1",
    "ng2-tooltip-directive": "^2.1.9",
    "ngx-bootstrap": "^6.2.0",
    "ngx-cookie-service": "^2.1.0",
    "ngx-custom-validators": "^7.0.0",
    "ngx-editor": "^13.0.0",
    "ngx-embed-video": "^1.0.4",
    "ngx-google-places-autocomplete": "^2.0.3",
    "ngx-infinite-scroll": "^7.2.0",
    "ngx-linkedin": "0.0.6",
    "ngx-owl-carousel": "^2.0.7",
    "ngx-owl-carousel-o": "^2.0.1",
    "ngx-page-scroll": "^8.0.0",
    "ngx-page-scroll-core": "^8.0.0",
    "ngx-pagination": "^3.2.1",
    "ngx-perfect-scrollbar": "^7.2.1",
    "ngx-sharebuttons": "^10.0.0",
    "ngx-toastr": "^14.0.0",
    "node-fetch": "^2.6.0",
    "or": "^0.2.0",
    "querystring": "^0.2.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "rxjs": "~7.5.2",
    "script-loader": "^0.7.2",
    "skeleton-css": "^2.0.4",
    "socket.io-client": "^2.2.0",
    "sweetalert2": "^11.0.18",
    "tslib": "^2.3.0",
    "underscore": "^1.9.1",
    "web-animations-js": "^2.3.2",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^12.0.5",
    "@angular/cli": "^12.0.5",
    "@angular/compiler-cli": "~12.0.5",
    "@angular/language-service": "~12.0.5",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^8.10.61",
    "@types/prosemirror-commands": "^1.0.4",
    "codelyzer": "^5.0.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.1.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "tslint": "~5.11.0",
    "typescript": "^4.5.4"
  },
  "browser": {
    "crypto": false
  }
}

What happened was I'd started facing the same issue as was reported a few days ago on 406 - the issue didn't get sorted but inadvertently now the above error has started to occur - work has stalled and I've tried everything. Any ideas how to finally resolve this?

Version

v13.0.0

Angular Version

v12.0.5

What browsers are you seeing the problem on?

No response

Link to reproduce

No response

Relevant log output

./node_modules/ngx-editor/fesm2015/ngx-editor.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string '/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs: Errors found in the template:
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("p\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">[ERROR ->]{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"of"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1306
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("p\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">[ERROR ->]{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"of"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1306
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div [ERROR ->]*ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n   "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1428
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div [ERROR ->]*ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n   "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1428
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          [ERROR ->]{{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n  "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          [ERROR ->]{{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1828
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("nNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"[ERROR ->]!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ t"): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1945
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Expected identifier for property access at the end of the expression [ {{ href.errors?.['pattern'] && 'Please enter valid url.' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1058 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Unexpected token [, expected identifier or keyword at column 15 in [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
Parser Error: Expected identifier for property access at the end of the expression [ {{ text.errors?.['required'] && 'This is required' }} ] in /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1536 ("       </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">[ERROR ->]{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, "): /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/ngx-editor/fesm2015/ngx-editor.mjs@1323:1959
  1322 | }
  1323 | LinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LinkComponent, deps: [{ token: i0.ElementRef }, { token: NgxEditorService }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component });
> 1324 | LinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: LinkComponent, selector: "ngx-link", host: { listeners: { "document:mousedown": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"NgxEditor__MenuItem--IconContainer\" [class.NgxEditor__MenuItem--Active]=\"isActive || showPopup\"\n  [class.NgxEditor--Disabled]=\"!canExecute\" [innerHTML]=\"icon | sanitizeHtml\" (mousedown)=\"onMouseDown($event)\"\n  [title]=\"title\">\n</div>\n\n<!-- popup -->\n<div *ngIf=\"showPopup\" class=\"NgxEditor__Popup\">\n  <form class=\"NgxEditor__Popup--Form\" [formGroup]=\"form\" (ngSubmit)=\"insertLink($event)\">\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('url')}}</label>\n        <input type=\"href\" id=\"href\" formControlName=\"href\" autofocus autocomplete=\"off\" />\n        <div *ngIf=\"href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div *ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          {{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }], pipes: { "sanitizeHtml": SanitizeHtmlPipe } });
       |                                                                                                                                                                                                                                      ^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1325 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LinkComponent, decorators: [{
  1326 |             type: Component,
  1327 |             args: [{ selector: 'ngx-link', template: "<div class=\"NgxEditor__MenuItem--IconContainer\" [class.NgxEditor__MenuItem--Active]=\"isActive || showPopup\"\n  [class.NgxEditor--Disabled]=\"!canExecute\" [innerHTML]=\"icon | sanitizeHtml\" (mousedown)=\"onMouseDown($event)\"\n  [title]=\"title\">\n</div>\n\n<!-- popup -->\n<div *ngIf=\"showPopup\" class=\"NgxEditor__Popup\">\n  <form class=\"NgxEditor__Popup--Form\" [formGroup]=\"form\" (ngSubmit)=\"insertLink($event)\">\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('url')}}</label>\n        <input type=\"href\" id=\"href\" formControlName=\"href\" autofocus autocomplete=\"off\" />\n        <div *ngIf=\"href.touched && href.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ href.errors?.['pattern'] && 'Please enter valid url.' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label class=\"NgxEditor__Popup--Label\">{{getLabel('text')}}</label>\n        <input type=\"text\" formControlName=\"text\" autocomplete=\"off\" />\n        <div *ngIf=\"text.touched && text.invalid\" class=\"NgxEditor__HelpText NgxEditor__HelpText--Error\">\n          {{ text.errors?.['required'] && 'This is required' }}\n        </div>\n      </div>\n    </div>\n\n    <div class=\"NgxEditor__Popup--FormGroup\">\n      <div class=\"NgxEditor__Popup--Col\">\n        <label>\n          <input type=\"checkbox\" formControlName=\"openInNewTab\" />\n          {{getLabel('openInNewTab')}}\n        </label>\n      </div>\n    </div>\n\n    <button type=\"submit\" [disabled]=\"!form.valid\">{{getLabel('insert')}}</button>\n\n  </form>\n</div>\n", styles: [""] }]'
    at run (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/@babel/core/lib/transformation/index.js:37:15)
    at run.next (<anonymous>)
    at Function.transform (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/@babel/core/lib/transform.js:25:41)
    at transform.next (<anonymous>)
    at step (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:261:32)
    at /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:223:11)
    at /home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/gensync/index.js:37:40

Error: node_modules/prosemirror-model/dist/index.d.ts:1:8 - error TS1259: Module '"/home/ali/Projects/ThePitchPortal/Source/dev.thepitchportal.local/TPPCode/web/node_modules/orderedmap/dist/index-cjs"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

1 import OrderedMap from 'orderedmap';
         ~~~~~~~~~~

  node_modules/orderedmap/dist/index-cjs.d.ts:31:1
    31 export = OrderedMap
       ~~~~~~~~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

Error: src/app/shared/services/custom-http-interseptor.ts:13:37 - error TS2339: Property 'do' does not exist on type 'Observable<HttpEvent<any>>'.

13         return next.handle(request).do((event: HttpEvent<any>) => {
                                       ~~

Error: src/app/shared/services/title.service.ts:21:14 - error TS2339: Property 'filter' does not exist on type 'Observable<Event>'.

21             .filter((event) => event instanceof NavigationEnd)
                ~~~~~~

Error: src/app/shared/token.interceptor.ts:29:9 - error TS2322: Type 'Observable<unknown>' is not assignable to type 'Observable<HttpEvent<any>>'.
  Type 'unknown' is not assignable to type 'HttpEvent<any>'.
    Property 'type' is missing in type '{}' but required in type 'HttpUserEvent<any>'.

 29         return next.handle(req).pipe(
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 30             map(event => {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
 40             }),
    ~~~~~~~~~~~~~~~
 41         );
    ~~~~~~~~~~

  node_modules/@angular/common/http/http.d.ts:3846:5
    3846     type: HttpEventType.User;
             ~~~~
    'type' is declared here.

Error: src/app/shared/token.interceptor.ts:39:35 - error TS2339: Property 'throw' does not exist on type 'typeof Observable'.

39                 return Observable.throw(error);
                                     ~~~~~

Willing to submit a PR?

No response

sibiraj-s commented 1 year ago

Try deleting the node_modules as well as lockfile and reinstall again.

maliakmal commented 1 year ago

I've tried that infact I do an npm clear cache everytime after deleting node_modules folder and the package lock json file. Its still not working.

maliakmal commented 1 year ago

Its giving a Parser error in the templates - is this an issue likely with version of Angular used?

sibiraj-s commented 1 year ago

Possible. ngx-editor v13. requires angular 13.

sibiraj-s commented 1 year ago

I totally forgot about the overrides option. can you try

{
  "overrides": {
    "ngx-editor": {
      "@types/prosemirror-commands": "1.0.4",
      "@types/prosemirror-history": "1.0.3",
      "@types/prosemirror-inputrules": "1.0.4",
      "@types/prosemirror-keymap": "1.0.4",
      "@types/prosemirror-model": "1.16.1",
      "@types/prosemirror-schema-list": "1.0.3",
      "@types/prosemirror-state": "1.2.8",
      "@types/prosemirror-view": "1.23.1",
      "prosemirror-commands": "1.2.2",
      "prosemirror-history": "1.2.0",
      "prosemirror-inputrules": "1.1.3",
      "prosemirror-keymap": "1.1.5",
      "prosemirror-model": "1.16.1",
      "prosemirror-schema-list": "1.1.6",
      "prosemirror-state": "1.3.4",
      "prosemirror-view": "1.23.12"
    }
  }
}

See https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

rko9 commented 1 year ago

I totally forgot about the overrides option. can you try

{
  "overrides": {
    "ngx-editor": {
      "@types/prosemirror-commands": "1.0.4",
      "@types/prosemirror-history": "1.0.3",
      "@types/prosemirror-inputrules": "1.0.4",
      "@types/prosemirror-keymap": "1.0.4",
      "@types/prosemirror-model": "1.16.1",
      "@types/prosemirror-schema-list": "1.0.3",
      "@types/prosemirror-state": "1.2.8",
      "@types/prosemirror-view": "1.23.1",
      "prosemirror-commands": "1.2.2",
      "prosemirror-history": "1.2.0",
      "prosemirror-inputrules": "1.1.3",
      "prosemirror-keymap": "1.1.5",
      "prosemirror-model": "1.16.1",
      "prosemirror-schema-list": "1.1.6",
      "prosemirror-state": "1.3.4",
      "prosemirror-view": "1.23.12"
    }
  }
}

See https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

Screenshot 2022-06-05 at 7 53 55 AM

HI @sibiraj-s After Adding these getting this error, I have deleted node modules, yarn.lock file and then yarn install and built my angular 11 app. ngx-editor version is 8.1.1.

sibiraj-s commented 1 year ago

Ah, that means the fix seems to be working. Try to downgrade the versions published with ngx-editor v8. What I sent was from nearly recent versions of the editor,

See https://unpkg.com/browse/ngx-editor@8.1.1/package.json here for the required versions.

sibiraj-s commented 1 year ago

And just to verify the fix. if it doesn't work with yarn. can you try with npm once?

rko9 commented 1 year ago

@sibiraj-s , Our project has dependency over yarn can't use npm and tried downgrading versions also but it's still showing the same error.

sibiraj-s commented 1 year ago

Try these versions.

  "overrides": {
    "ngx-editor": {
      "@types/prosemirror-commands": "1.0.4",
      "@types/prosemirror-history": "1.0.2",
      "@types/prosemirror-inputrules": "1.0.4",
      "@types/prosemirror-keymap": "1.0.4",
      "@types/prosemirror-model": "1.12.0",
      "@types/prosemirror-schema-list": "1.0.3",
      "@types/prosemirror-state": "1.2.6",
      "@types/prosemirror-view": "1.17.1",
      "prosemirror-commands": "1.1.7",
      "prosemirror-history": "1.1.3",
      "prosemirror-inputrules": "1.1.3",
      "prosemirror-keymap": "1.1.4",
      "prosemirror-model": "1.13.3",
      "prosemirror-schema-list": "1.1.4",
      "prosemirror-state": "1.3.4",
      "prosemirror-view": "1.18.1",
      "prosemirror-transform": "1.4.0"
    }
  }

Added prosemirror-transform new. I tested this in angular 11. ngx-editor v8. Everything works fine. The error you mentioned is gone after this.

rko9 commented 1 year ago

Thanks @sibiraj-s it worked!!!

sibiraj-s commented 1 year ago

Closing the issue as it has a clear workaround/fix.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.