Home > Back-end >  missing npm dependencies in visual studio
missing npm dependencies in visual studio

Time:08-09

I have some npm dependencies that are showing missing in visual studio solutions. I added the dependencies to my package json file but some of my dependencies are showing missing error ex: express, typescript, and react dom.

1

CodePudding user response:

Just by adding them in package.json will not work. You need to install them to your environment.

  1. Open your terminal
  2. move to the folder where you have your project setup
  3. Type npm install package_name and hit enter

If the packages are already present in dependencies in package.json Just type npm install in your terminal it will install all the packages that are there in package.json

CodePudding user response:

I can see there is a package.json file inside your project folder, Just run npm install inside your project folder. So that all the packages and dependencies will automatically be installed inside your project.

If the problem still persist, Then your package.json file might not contain those packages which you should install manually like below,

npm install express
npm install -g typescript
npm install react react-dom
  • Related