简体   繁体   中英

New Jode.js project in visual studio: Missing NPM

I'm going through a basic tutorial on how to create a Node.Js project in Visual Studio. I create the project and there is an "npm" folder with some packages listed such as : body-parser, cookie-parser, etc. They all have "(missing)" next to them. I've gone through this new project setup a few times. Sometimes when I right click on the package the "Install npm Package" is greyed out. Sometimes it isn't. When it isn't and I select "Install npm package", it does absolutely nothing.

This is a new project. There is no Git repository or anything. This is literally just a new Node.js project straight out of the box. Does anyone know why these npm packages are missing or why I can't install them?

I found this, which isn't related to visual studio, but someone trying to install express via the command line:

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

I found some stuff in the logs about a local cert not found. I had to run npm config set strict-ssl and suddenly it worked. Go figure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM