Ionic invalid package name __ngcc_entry_points__.json

For me, the solution was to remove any space from the "name" in package.json, for example

{
  "name": "My App",
  "version": "0.0.1",
  ...

becomes

{
  "name": "My_App",
  "version": "0.0.1",
  ...

I have often experienced seeing this error message while working on Angular projects. And that prevents adding any dependencies due to the conflicts in the package-lock.json file. Whereas removing the node modules folder and reinstalling them gets rid of this, it's not always feasible to do that as for bigger projects, it can consume a lot of time. The solution that works for me is

  1. Deleting package-lock.json file
  2. Deleting ngcc_entry_points.json file from the node_modules folder
  3. Running npm install (It just recreates the package-lock.json file) And just like that conflicts get resolved! Hope it helps save time for someone.

Solution to this problem is:

rm -rf node_modules

npm install 

I had this problem and it was caused due to __ngcc_entry_points__ element in package-lock.json file (can be located in the root directory, next to package.json).

Removing the __ngcc_entry_points__ element from package-lock.json, deleting node_modules and running npm install again fixed the problem