[Solved] Please verify that the package.json has a valid “main” entry

The error in the following figure shows that the main entry is missing

Solution:

1. Delete the two files: node_modules and package-lock.json

2. Entering npm i on the command will download the package again

3. Check again and no error is reported

Read More: