Npm install not working


Your screen might look like shown below:

Let’s solve this:

npm is short for Node Package Manager, is basically an online repository for the publishing of open-source Node.js projects & it is a command-line tool for interacting with said repository that aids in package installation, version management, and dependent management. A variety of useful modules and packages are available as publications on npm, and many more keep getting added every day.

The packages that we need to install can be installed using this single line of command that happens to be ‘npm install’

A normal installation process involves installing the required packages through creating a ‘package.json’ file, which is a json encoding of all the packages that are required.

Step 1) Check if you have the package.json file in the directory you are currently in by looking at the file structure as shown in VScode to the left when you open the folder using File -> Open Folder -> the cloned Qprofile folder -> portfolio-frontend

Step 2) If you see the above file, you can open it and see the packages that our project needs that looks like:

Step 3) If you see similar content, this is the right directory for you to execute the command npm install

Toggle to this directory using the following commands: (replace the name of the folder inside workspace directory by your username named folder)

cd ~/workspace/amogh-desai-crio-users-ME_QPROFILE/

cd portfolio-frontend

npm install

If the installation is successful, you should see a node_modules folder inside portfolio-frontend directory.