Resolve NPM install “unmet dependency” warning

Sometimes when you try to install node modules , npm prompts the following warning message :

Capture.PNG

npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined

Because of this some of the node modules might not get installed correctly . There are couple of main reasons why this could happen .

  1. You might be using a older version of NPM .
    Solution : Check your NPM version and make sure it is upto date . If not try updating your NPM application globally .
  2. Network interruptions while downloading dependencies or NPM cache problems Solution :  Ctrl + Del the local node_modules folder and run “npm cache clean” . This should enable you to run a clean “npm install” again .

Git rebase merge conflict solving : Did you forget to use add ?

Sometimes when you rebase your branch with the master branch and after fixing a merge conflict you might encounter following issue

The loopy problem of git rebasing
$ git rebase –continue
Applying: loglevel equal to silent
No changes – did you forget to use ‘git add’?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem, run “git rebase –continue”.
If you prefer to skip this patch, run “git rebase –skip” instead.
To check out the original branch and stop rebasing, run “git rebase –abort”.

git

But the problem you might having is that you have already added the file using git add <yourconfilctedfilename>  And might have added several times but still Git telling you to add the file again ??

Sometimes you got to skip your problems , bro
I have encountered this issue couple of times and it turns out is a Git bug which was later fixed with Git 2.0.2 version. So anyway in this case rather than updating your git application , you can simply do the git rebase –skip and just skip the patch. It will not do any harm because the patch was empty anyway .

How to set Visual Studio Version With NPM

When you install NPM modules in windows environment  , some times you might ran into an error like below.

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build t
ools for Visual Studio 2010 (Platform Toolset = ‘v100’) cannot be found. To build using the v100 build tools, please in
stall Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting t
he Project menu or right-click the solution, and then selecting “Upgrade Solution…”. [C:\Users\Documents\FLIS.Client.Tests\
node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]

As you can see the error says that it cannot find the Visual studio 2010 platform toolset. In this case you can externally specify build platform toolset to NPM like this.

–msvs-version=2013 // I am running visual studio 2013 . So…

For E.g If you want to install protractor with –msvs-version=2013

npm install protractor –msvs-version=2013

Difference between $scope and $rootscope

Difference between $scope and $rootscope This article is written assuming you have the basic concepts of AngularJS !  Whenever you declare a controller in angular , you automatically create a $scope . So what does a $scope mean : “$scope is an object that refers to the application model. It is an execution context for expressions. $scopes are arranged in hierarchical structure which mimic the DOM structure of the application. $scope can watch expressions and propagate events.” documentation . In simpler terms it means that it is a way of tying an object to the DOM . If you consider the MVC model in Angular , the scope acts as a model . It is a template which hosts all the functions and the related data . Okay now that we have gotten some insight into the $scope , let talk about $rootscope shall we ? $rootscope is the parent (more like a root parent ) of all the $scopes you create . It is the ultimate boss . It is (almost) like the Object class of Java .It is the top most $scope of your app and it contains ng-app directive . There is only one $rootscope for each of the Angular application .

scopevsrootscope

Connection between $rootscope and $scope