We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

str.match is not a function

Seeing the above error when trying to render any angualr control inside and ng-template as e-pane content. Even the samples do not work. Any help would be appreciated.

Have not had issues rendering other controls.

Cheers

Mark

Code and markup is as in the linl splitter example code


Error
ERROR TypeError: str.match is not a function
    at evalExp (vendor.js:171639)
    at compile (vendor.js:171626)
    at Object.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-base/src/template-engine.js.Engine.compile (vendor.js:171555)
    at compile (vendor.js:171514)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.compileElement (vendor.js:176448)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.templateCompile (vendor.js:176432)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.setTemplate (vendor.js:176427)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.createSplitPane (vendor.js:176489)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.render (vendor.js:175362)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (vendor.js:166124)

23 Replies

VK Vinoth Kumar Sundara Moorthy Syncfusion Team May 27, 2019 08:27 AM

Hi Mark,  
  
Thank you for contacting Syncfusion support.  
  
We were able to reproduce the reported issues while using ng-template content in Splitter panes. This issue occurs due to installing duplicate packages in your application. We suggest you to run the below command to remove the duplicate packages and re-run the application to resolve this issue.  
  
> npm dedupe  
   
  
Could you please check the above documentation and get back to us if you need any further assistance on this?  
   
Regards,  
Vinoth Kumar S  



JJ Jeremy Jacob June 12, 2019 12:37 PM

I'm getting a similar problem - tried the npm dedup but no change..

core.js:15714 ERROR TypeError: str.match is not a function
    at evalExp (template.js:65)
    at compile (template.js:52)
    at Object.Engine.compile (template-engine.js:57)
    at compile (template-engine.js:16)
    at ScheduleComponent.Schedule.templateParser (schedule.js:687)
    at ScheduleComponent.Schedule.initializeTemplates (schedule.js:288)
    at ScheduleComponent.Schedule.initializeView (schedule.js:280)
    at ScheduleComponent.Schedule.renderElements (schedule.js:140)
    at ScheduleComponent.Schedule.initializeResources (schedule.js:119)
    at ScheduleComponent.Schedule.render (schedule.js:109)


NR Nevitha Ravi Syncfusion Team June 14, 2019 01:31 AM

Hi Jeremy, 

Greetings from Syncfusion Support. 

We have checked the reported problem at our end and unable to reproduce it at our end. Please refer the sample from the following link. 

Please try out the sample if the issue persist still kindly share the code snippets you have tried else try to reproduce the issue in a sample to check the issue further at our end. 

Regards, 
Nevitha 



EM Emanuele replied to Mark July 29, 2019 02:49 AM

Seeing the above error when trying to render any angualr control inside and ng-template as e-pane content. Even the samples do not work. Any help would be appreciated.

Have not had issues rendering other controls.

Cheers

Mark

Code and markup is as in the linl splitter example code


Error
ERROR TypeError: str.match is not a function
    at evalExp (vendor.js:171639)
    at compile (vendor.js:171626)
    at Object.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-base/src/template-engine.js.Engine.compile (vendor.js:171555)
    at compile (vendor.js:171514)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.compileElement (vendor.js:176448)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.templateCompile (vendor.js:176432)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.setTemplate (vendor.js:176427)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.createSplitPane (vendor.js:176489)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-layouts/src/splitter/splitter.js.Splitter.render (vendor.js:175362)
    at SplitterComponent.push../node_modules/@syncfusion/ej2-angular-layouts/node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (vendor.js:166124)

Good morning, I found myself having the same problem mentioned by Mark. I followed the instructions indicated, although in truth I use Yarn and not NPM, failing to solve the problem could you help me?

Thanks a lot.


NP Narayanasamy Panneer Selvam Syncfusion Team July 31, 2019 05:52 AM

Hi Mark,

Thanks for your update. 
To resolve your issue, We suggest you run the below command to remove the duplicate packages and re-run the application.    
> yarn install –flat  

If still the reported issue reproduced, please let us know with the sample or package.json file you have used in application. 
Regards, 
Narayanasamy P. 



PA Pedro Antonio August 5, 2019 04:29 PM

Hi, I got the same error but for me works downgrade from 17.2.* to 17.1.* 

here is the list

"@syncfusion/ej2-base": "17.1.49",
"@syncfusion/ej2-buttons": "17.1.50",
"@syncfusion/ej2-splitbuttons": "17.1.51",
"@syncfusion/ej2-calendars": "17.1.51",
"@syncfusion/ej2-charts": "17.1.51",
"@syncfusion/ej2-diagrams": "17.1.50",
"@syncfusion/ej2-maps": "17.1.51",
"@syncfusion/ej2-treemap": "17.1.48",
"@syncfusion/ej2-circulargauge": "17.1.50",
"@syncfusion/ej2-data": "17.1.51",
"@syncfusion/ej2-dropdowns": "17.1.49",
"@syncfusion/ej2-grids": "17.1.51",
"@syncfusion/ej2-inputs": "17.1.50",
"@syncfusion/ej2-lists": "17.1.47",
"@syncfusion/ej2-navigations": "17.1.49",
"@syncfusion/ej2-popups": "17.1.50",
"@syncfusion/ej2-lineargauge": "17.1.48",
"@syncfusion/ej2-pdf-export": "17.1.48",
"@syncfusion/ej2-compression": "17.1.47",
"@syncfusion/ej2-excel-export": "17.1.50",
"@syncfusion/ej2-file-utils": "17.1.47",
"@syncfusion/ej2-svg-base": "17.1.48",
"@syncfusion/ej2-documenteditor": "17.1.50",
"@syncfusion/ej2-richtexteditor": "17.1.49",
"@syncfusion/ej2-notifications": "17.1.48",
"@syncfusion/ej2-heatmap": "17.1.47",
"@syncfusion/ej2-pivotview": "17.1.49",
"@syncfusion/ej2-schedule": "17.1.51",
"@syncfusion/ej2-layouts": "17.1.51",
"@syncfusion/ej2-angular-base": "17.1.50",
"@syncfusion/ej2-angular-buttons": "17.1.50",
"@syncfusion/ej2-angular-splitbuttons": "17.1.51",
"@syncfusion/ej2-angular-calendars": "17.1.51",
"@syncfusion/ej2-angular-charts": "17.1.51",
"@syncfusion/ej2-angular-diagrams": "17.1.50",
"@syncfusion/ej2-angular-maps": "17.1.51",
"@syncfusion/ej2-angular-treemap": "17.1.48",
"@syncfusion/ej2-angular-circulargauge": "17.1.50",
"@syncfusion/ej2-angular-dropdowns": "17.1.49",
"@syncfusion/ej2-angular-grids": "17.1.51",
"@syncfusion/ej2-angular-inputs": "17.1.50",
"@syncfusion/ej2-angular-lists": "17.1.47",
"@syncfusion/ej2-angular-navigations": "17.1.49",
"@syncfusion/ej2-angular-popups": "17.1.50",
"@syncfusion/ej2-angular-lineargauge": "17.1.48",
"@syncfusion/ej2-angular-documenteditor": "17.1.50",
"@syncfusion/ej2-angular-richtexteditor": "17.1.49",
"@syncfusion/ej2-angular-notifications": "17.1.48",
"@syncfusion/ej2-angular-heatmap": "17.1.47",
"@syncfusion/ej2-angular-pivotview": "17.1.49",
"@syncfusion/ej2-angular-schedule": "17.1.51",
"@syncfusion/ej2-angular-layouts": "17.1.51",



NP Narayanasamy Panneer Selvam Syncfusion Team August 6, 2019 10:39 PM

Hi Mark, 
  
Currently we are validating your problem, we will update on this shortly. We appreciate your patience until then. 
  
Regards, 
Narayanasamy P. 



JH Joachim Heck August 10, 2019 04:26 AM

Same problem here -  we also receive the str.match error on grid component.

ERROR TypeError: str.match is not a function
    at evalExp (template.js:67)
    at compile (template.js:54)
    at Object.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/template-engine.js.Engine.compile (template-engine.js:124)
    at compile (template-engine.js:21)
    at templateCompiler (util.js:165)
    at new Column (column.js:138)
    at prepareColumns (util.js:221)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.render (grid.js:713)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (component.js:134)
    at component-base.js:100


ERROR TypeError: Cannot read property 'getPanel' of undefined
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.getContent (grid.js:1330)
    at Render.push../node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js.Render.refreshDataManager (render.js:166)
    at GridComponent. (render.js:100)
    at GridComponent.push../node_modules/@syncfusion/ej2-angular-base/src/component-base.js.ComponentBase.trigger (component-base.js:204)
    at Render.push../node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js.Render.refresh (render.js:77)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.extendedPropertyChange (grid.js:1124)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.onPropertyChanged (grid.js:994)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/base.js.Base.dataBind (base.js:103)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/component.js.Component.dataBind (component.js:143)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)


after updating to 17.2 version from 17.1
"@syncfusion/ej2-angular-barcode-generator": "^17.2.34",
"@syncfusion/ej2-angular-buttons": "^17.2.35",
"@syncfusion/ej2-angular-calendars": "^17.2.36",
"@syncfusion/ej2-angular-charts": "^17.2.36",
"@syncfusion/ej2-angular-dropdowns": "^17.2.36",
"@syncfusion/ej2-angular-grids": "^17.2.40",
"@syncfusion/ej2-angular-inputs": "^17.2.39",
"@syncfusion/ej2-angular-navigations": "^17.2.39",
"@syncfusion/ej2-angular-popups": "^17.2.35",
"@syncfusion/ej2-angular-splitbuttons": "^17.2.39",
"@syncfusion/ej2-grids": "^17.2.40",
"@syncfusion/ej2-layouts": "^17.2.39",
"@syncfusion/ej2-navigations": "^17.2.40",



JL jose lara August 10, 2019 04:51 PM

I am also seeing the same errors.

ERROR TypeError: str.match is not a function
    at evalExp (template.js:67)
    at compile (template.js:54)
    at Object.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/template-engine.js.Engine.compile (template-engine.js:124)
    at compile (template-engine.js:21)
    at templateCompiler (util.js:165)
    at new Column (column.js:138)
    at prepareColumns (util.js:221)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.render (grid.js:713)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (component.js:134)
    at component-base.js:100


ERROR TypeError: Cannot read property 'getPanel' of undefined
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.getContent (grid.js:1330)
    at Render.push../node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js.Render.refreshDataManager (render.js:166)
    at GridComponent. (render.js:100)
    at GridComponent.push../node_modules/@syncfusion/ej2-angular-base/src/component-base.js.ComponentBase.trigger (component-base.js:204)
    at Render.push../node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js.Render.refresh (render.js:77)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.extendedPropertyChange (grid.js:1124)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.onPropertyChanged (grid.js:994)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/base.js.Base.dataBind (base.js:103)
    at GridComponent.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-base/src/component.js.Component.dataBind (component.js:143)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)



VK Vinoth Kumar Sundara Moorthy Syncfusion Team August 13, 2019 08:46 AM

Hi Jose,  
 
Good day to you. 
 
We suspect that some duplicate packages might be installed in your ‘@syncfusion’ folder of ‘node_modules’. Please follow the steps provided in the following the below steps to overcome the reported behavior.  
 
1.       Delete package.lock.json file from your application. 
2.       Remove the @syncfusion  package folder from the node_modules. 
3.       Use same version for all components in package.json file. 
4.       Then install the new packages. 
  
  
Could you please follow the above step and get back to us with package.lock.json file if you still facing the same problem? 
  
Regards,  
Vinoth Kumar S 



JL jose lara August 13, 2019 07:57 PM

Hi thanks for the response.The error went away, but my grid toolbar isn't visible. Double clicking a row also does not open the editor window. I don't have a way of getting to the edit or add window. I've attached the package-lock.json as requested. This is the code I am using in my project- https://ej2.syncfusion.com/angular/demos/#/material/grid/dialog-reactive-form



Attachment: packagelock.json_91e503d.zip


JL jose lara August 15, 2019 06:35 PM

can you please respond? I am waiting for your response.


PS Pavithra Subramaniyam Syncfusion Team August 20, 2019 12:17 AM

Hi Jose, 

Sorry for the delay. 

We have checked your query and We suspect that you may miss to refer the style for EJ2 toolbar and Dialog component. So please ensure to refer the all dependency styles in your application to overcome the reported behavior. 



If you are still facing the issue please share the below details that will be helpful for us to provide a better solution as early as possible. 

  1. Share the stack trace if any script error
  2. Share the issue reproducible sample.

Regards, 
Pavithra S. 



JL jose lara August 20, 2019 09:55 PM

thx. I forgot to include providers and it works now-  providers: [ToolbarService, EditService, PageService]


PS Pavithra Subramaniyam Syncfusion Team August 21, 2019 12:17 AM

Hi jose, 

Thanks for your update. 

Please get back to us if you need any further assistance. 

Regards, 
Pavithra S. 



EV Ervin van der Merwe replied to Vinoth Kumar Sundara Moorthy December 9, 2019 07:34 AM

Hi Jose,  
 
Good day to you. 
 
We suspect that some duplicate packages might be installed in your ‘@syncfusion’ folder of ‘node_modules’. Please follow the steps provided in the following the below steps to overcome the reported behavior.  
 
1.       Delete package.lock.json file from your application. 
2.       Remove the @syncfusion  package folder from the node_modules. 
3.       Use same version for all components in package.json file. 
4.       Then install the new packages. 
  
  
Could you please follow the above step and get back to us with package.lock.json file if you still facing the same problem? 
  
Regards,  
Vinoth Kumar S 


This sorted it out. Thanks


PS Pavithra Subramaniyam Syncfusion Team December 9, 2019 11:50 PM

Hi Ervin, 
 
Thanks for you update. 

We are glad to know that the provided solution resolved the issue. 

Please contact us if you have any concern. 
 
Regards, 
Pavithra S. 



RA RakhiS June 4, 2020 01:25 AM

worked for me as well.


RR Rajapandi Ravi Syncfusion Team June 5, 2020 06:51 AM

Hi RakhiS, 

We are happy to hear that your issue resolved. 

Please get back to us if you need further assistance. 

Regards, 
Rajapandi R 



KK Kalyan Kumar October 7, 2020 02:33 AM

Followed all the steps, still facing the issue. It is not possible to use the same version to all the syncfusion components. Getting error of no matching version found.
Could you please respond back quickly?


RR Rajapandi Ravi Syncfusion Team October 7, 2020 07:29 AM

Hi Kalyan, 

Your reported problem “str.match is not a function” occurs only if duplicate packages are installed in ‘@syncfusion’ folder of ‘node_modules’ in your application. If you are facing the error “Getting error of no matching version found” like this, we suggest you to define ‘*’ instead of defining package version.  So please follow the steps provided below to resolve this,  

  • Delete package.lock.json file from your application.  
  • Remove the @syncfusion package folder from the node_modules.
  • Use same version or “*”(Installs the latest packages) for all Syncfusion components in package.json file.  
  • Then install the NPM packages.  
           
Package.json 
 
"dependencies": {  
    "@syncfusion/ej2-angular-grids": "*", 
    "@syncfusion/ej2-base": "*", 
    "@syncfusion/ej2-data": "*", 
     .  .  .  .  .  .  .  . 
     .  .  .  .  .  .  .  . 
  } 
 


Local Grid sample with latest packages for your reference, 


Please get back to us if you require any further assistance. 

Regards, 
Rajapandi R 



DA David replied to Rajapandi Ravi February 3, 2022 04:11 AM

Rebuilding package.json and synchronising control versions worked for me:

https://www.syncfusion.com/forums/144809/str-match-is-not-a-function?reply=NtIG1A 


Thanks!



VN Vignesh Natarajan Syncfusion Team February 3, 2022 11:13 PM

Hi David,  
 
Thanks for the update. We are happy to hear that your issue has been resolved.  
 
Please get back to us if you have further queries. 
 
Regards, 
Vignesh Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon