The solution installed with cnpm is not found in package.json

The solution installed with cnpm is not found in package.json

origin

Today, when I was writing a project, I used the dependencies installed by cnpm. After the installation was prompted, I wanted to go to the package.json file to check the dependencies installed. The result was not found, but the installation was indeed successful in the node_modules folder. This is It's very confusing.

Solution

Just add one at the end of the command -S(大写的S), so that the installed dependencies can be seen in package.json.

cnpm install xxx(依赖的名称) -S

Guess you like

Origin blog.csdn.net/weixin_43852569/article/details/120247072