Search code examples
node.jsnpmdependenciescreate-react-apppackage.json

Error in create-react-app - Missing dependencies in package.json


I'm using npx create-react-app my-app in CMD (Windows 11) and always get the error "Missing dependencies in package.json". When I try npm start I got "npm ERR! Missing script: "start"".

Tried creating in different folders, uninstalling NodeJS and installing it again with the Node installer and with NVM. Tried installing Yarn. Also tried --use-npm.


Solution

  • Finally got it working. Searching through my user folder, I found this file ".npmrc", in C:\Users\User, the only line inside the file was "location=global". I deleted the file and now create-react-app works! 😁