Npm ls found that there are many packages that are not installed?

an exercise from vue2 + webpack3. The compilation works fine.

when you look at it with npm ls-- depth=0 , you find that there are many packages that are not installed:

clipboard.png

npm version is 5.6
what is the reason for this?

Sep.12,2021

this problem is quite common. There are many reasons, such as network problems, module directory corruption, module cache problems. The recommended methods are as follows
  1. switch mirror sources using images from Taobao. I won't say much about the method. Baidu is my own, but it is recommended to use nrm this module to quickly manage and switch images. Basically, there are three names
.
nrm ls // 
nrm use <mirror name> // 
nrm test <mirror name> // 
  1. then delete your node_modules module file. Note that the file directory is too deep to simply delete. Use some tools, such as rimraf module to execute rimraf node_modules .
  2. check the package.json file to see if the modules you need have been written in package.json

Last installation npm install
if there is still an installation error at this time, check the error log and be clear about npm's cache npm cache clean
but it is recommended to use yarn


has encountered this situation recently. This should be an error report under the linux platform, but no problem under mac.
this is a problem caused by fsevents.
webpack depends on chokidar,chokidar, depends on fsevents,fsevents, can only be installed under macOS, and cannot be installed on the linux system.
these error reporting modules are all fsevents dependent modules, and none of them are installed.
but because the linux platform does not require fsevents, it works without installation. It's just that the npm ls command lists these modules and shows Err, regardless of these errors.
this problem has been encountered by many people in the npm forum, and there is no good solution at present. Even the current highest version of npm does not solve this problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9c60b-18d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9c60b-18d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?