Wednesday, October 27, 2021

npm WARN npm npm does not support Node.js v14.15.4

 First you need to open your command line, and use " npm install -g npm@latest  or npm install " you'll get the error like this

C:\Users\yourname>npm install -g npm@latest
npm WARN npm npm does not support Node.js v14.7.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function npm ERR! A complete log of this
run can be found in: npm ERR! 
C:\Users\BOMWALMIKIA\AppData\Roaming\npm-cache\_logs\2020-08 10T09_36_56_388Z-debug.log

Solution 

  • Go to the path where you can find the debug log (this file is found in your npm-cache folder) C:\Users\yourname\AppData\Roaming
  • Delete the NPM and NPM-Cache folder, but DO NOT reinstall node. Once deleted go back to your command line and re-use the command " npm install -g npm@latest "



Tuesday, September 21, 2021

How to: Chrome: allow localhost site even without https certificate

 So as we all are learning, chrome is blocking entirely https sites, even those from localhosts. Sometimes you a presented with a warning screen. Sometimes you are presented with a connect to network screen despite being fully connected to the internet.

For those of us with application specific programs that do not require a certificate, maybe a self hosted test website or whatever you need. Chrome does allow you to override the warning about https certificates if the address is localhost.


1 Steps total

Step 1: Open Google Chrome

Enter the below into the address bar in google chrome.

chrome://flags/#allow-insecure-localhost

Set the option to enabled on allow-insecure-localhost.


Now you can able to access the localhost 

Monday, September 13, 2021

ASP.Net WCF: The service cannot be activated because it does not support ASP.NET compatibility

 The following error is thrown by the ASP.Net WCF Service when the aspNetCompatibilityEnabled attribute is set to true in Web.Config file.

The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the Web.Config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.


The Solution
The above error occurs because in order to make the WCF Service work in ASP.Net compatibility mode, you also need to decorate the WCF Service class with the AspNetCompatibilityRequirements attribute.
Below are the correct steps to make the WCF Service work in ASP.Net compatibility mode,
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>

If some case the above solution is not work go with below solution 
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/>

Thank you Hope it is help you



Tuesday, August 17, 2021

How do I clone a branch in Git?

 If you want to clone you code from DevOps using the ,cmd so steps are as below :-


Step 1:- Go to your branch and copy the clone Path(HTTPS or SSH).Use 

Step 2:- Go CMD and open your path where you want to clone your code.

Ste 3 :- Use this command git clone  <Step 1 Path>.

The full commands are as below 


 


Thank you Hope it is help you.

Friday, August 13, 2021

How to Downgrade/Upgrade angular version.

 If you want to Downgrade/Upgrade you angular version then you have follow the below steps.


Step 1:- npm uninstall -g @angular/cli

Step 2:- npm cache clean --force

Step 3:- Specify which version you want to install

npm install -g @angular/cli@x.x.x(For search list of version pls click here)


This will get the latest cli version: npm install -g @angular/cli



Thank you!


Node Sass version 6.0.1 is incompatible with ^4.0.0. angular

 When you getting error  "Node Sass version 6.0.1 is incompatible with ^4.0.0. angular" .The solution are as below:-

Step 1:- npm uninstall node-sass 

Step 2:- npm install node-sass@4.14.1

I thing it will help you.


Thank you 



Wednesday, June 23, 2021

Port 4200 is already in use. Use '--port' to specify a different port.

 if you are getting Port 4200 is already in use. Use '--port' to specify a different port the use below command.


ng serve --open --port 4201.

Thank you.