So, this issue will appear any time your package.json's dependencies field is in an invalid state. Mordy's comment is one way to get this to happen, Raja Uzair Zia's answer is another way, and one more is if external tooling directly edits the package.json file. (Expo is especially bad about this. If you try to npx expo install any invalid package, it'll happily break your package.json trying to install it.)
A fix is to go into your package.json and ensure that all packages A) exist on npm with the exact name seen in your package.json, and B) have valid names and version numbers.