[Front-end technology] When nodejs installs extension plug-ins, it always reports the enoent solution, nodejsenoent
When npm install is used to install the extension under a directory, the system always prompts "npm install Error: ENOENT, no such file or directory;
In the past, the installation process was smooth, but this was not the case. However, if this happens, you will be able to get upset. Therefore, you may find a solution and think it is necessary to summarize it.
Solution 1:
Switch to nodejs \ node_modules \ npm under the nodejs file in the command line and execute npm install a plug-in;
Solution 2:
You can use the npm init-f command to generate package. json. For fields missing in package. json, refer to the template.
Package. json is filled. The value of the field in package. json can be "", which is the dependency field. During installation, run npm install koa-save
It is automatically filled in the file.