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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

creating new project with template doesnt work

Thread ID:

Created:

Updated:

Platform:

Replies:

142084 Jan 17,2019 10:55 PM UTC Feb 25,2020 07:08 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: Common
Emil
Asked On January 17, 2019 10:55 PM UTC

I have just installed latest version EJ2 and created a new syncfusion web mvc project. then without doing any single change, i tried to run the test project. i get this error. What is the problem here? can you please suggest?

Severity Code Description Project File Line Suppression State
Error Build:Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.  Scripts\ej2\ej2.d.ts 71584


Jayakumar Duraisamy [Syncfusion]
Replied On January 18, 2019 10:35 AM UTC

Hi Emil, 
We have analyzed the reported issue and it is general problem occurs when create a new project manually using like Visual studio tool. Hence, we need to add the TypeScript Libraries tag in your ‘csproj’ file to overcome this issue.  
Please refer the below code snippet,  
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <TypeScriptRemoveComments>False</TypeScriptRemoveComments>
   <TypeScriptLib>dom,es2015</TypeScriptLib>
    <TypeScriptOutFile />     
</PropertyGroup> 
In our Syncfusion sample creator, we will include this solution by default while creating the demo samples. For that, we have created improvement task and you can also track the status of following task through our feedback portal,  
This support will be available in our upcoming volume 4, 2018 service pack 1 release which is expected to be roll out in the first week of February 2019. Also, we will publish the knowledge base documentation on January 21, 2019. 
Please let us know, if you need any other assistance. 
Regards,  
Jayakumar D  


Malcolm van Staden
Replied On February 18, 2020 01:16 PM UTC

Hi,

I'm not sure if this a sufficient solution but it worked for us, so I'm adding it here for anyone else that ends up having the same problem.

Under the folder that contains the ej2.d.ts (Scripts/ej2) add the following file:

tsconfig.json

Contents of this file:

{
  "compilerOptions": {
    "target": "ES2015",
    "module": "commonjs",
    "sourceMap": true
  }
}

Vairamuthu Ramamoorthi [Syncfusion]
Replied On February 25, 2020 07:08 AM UTC

Hi Malcolm, 

Thanks for your suggestion. 

As discussed earlier, the main cause of this problem occurs due to not including the required target library for the TypeScript compiler option. We can overcome this problem by using any of the following solutions.  

#1 using tsconfig.json, by adding required lib to ‘target’ from compilerOptions. 


  "compilerOptions": { 
    //... 
    "target": "ES2015" 
  }, 
  //... 

 
 
#2 Using MS build 

As we suggested in our last update, we can resolve this by adding the required library to the TypeScript Libraries tag in your ‘csproj’ file. Please refer to the below link.  

KB Link: 


Note: 
If ‘tsconfig.json’ exists in your project, then it will use the compiler setting from this configuration file. Otherwise, it will use the specified compiler setting from the project file (.csproj) fiile. 

 

Please feel free to get back to us if you have any queries. 

Regards, 
Vairamuthu R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon