NPM installation not working properly

  • Thread starter Thread starter GaneshRengasamy
  • Start date Start date
G

GaneshRengasamy

Guest
Hi Everyone,

I am working on create the ASP.NET Core Project Templates for my controls. I am using some third party npm packages to use my control after create the custom project template. I have added the logic for NPM installation itself to overcome the manual process of give the NPM restore from project while creating the custom project from my project template.

System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
string npmArguments = "/c npm install " + "@syncfusion/ej2-js-es5"+ "@" + "16.3.21";
p.StartInfo.Arguments = npmArguments;
p.StartInfo.RedirectStandardError = false;
p.StartInfo.RedirectStandardOutput = false;
p.StartInfo.UseShellExecute = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
Environment.CurrentDirectory = NPMInstallerPath;
try
{
dte.StatusBar.Text = ("Syncfusion Essential JS 2: " + project.Name + ", Adding Syncfusion EJ2 NPM to the project...");
p.Start();
p.WaitForExit();
}

1346230.png

But NPM is not restored by default after created the project. NPM package entries available in the package.json file. This issue has been reproduced in VS2017 15.7.1 only. I have checked the same VSIX in VS2017 15.8.4, the issue is not reproduced. NPM is installed properly.

Could you please suggest me anyone to resolve this issue?


Thanks,

Ganesan R.

Continue reading...
 
Back
Top