npm

NPM peerDependencies in Depth: A Comprehensive Introduction

NPM peerDependencies in Depth: A Comprehensive Introduction

As Javascript developers, we all know two different dependencies in our projects, dependencies and devDependencies, but what about peerDependencies? In this series, we will examine this less common dependency in Javascript. We will study what they are, what I need to know about as a library user, and what best practices are for library authors. What are dependencies in NPM Let's recap the different common types: dependencies: these are the tools used in your application; a good example is react, angular, and express. When your application is in production, the code of the libraries on dependencies will run under the…
Read More
Issue with NPM Package Installing Globally

Issue with NPM Package Installing Globally

I was not able to install npm packages globally in mac os(using npm install -g), but able to install locally in the project. Installing locally in every project will increase the total node_modules folder size and for every project we need to install the same packages that will be tedious and unnecessary. Here are the steps I performed. I was using Homebrew to install node and npm. So, Used command npm config get prefix - check where the npm actually points to. If this points to /opt/homebrew Check if node_modules are installed in cd /usr/local/lib If (2) is true, brew…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.