create-react-app dependency version issues with React 18

Until this is fixed for now you can delete the node_modules folder and package-lock.json. Next, open package.json and change “react”: “^18.0.0” & “react-dom”: “^18.0.0” to an earlier version e.g: “react”: “^17.0.2” & “react-dom”: “^17.0.2”. Finally, you can run npm install. Alternative Solution (Try this first!): solution suggested by joooni1998): delete both node_modules and package-lock.json run … Read more

NPM doesn’t install module dependencies

It looks like you hit a bug that has existed for quite a while and doesn’t have solution yet. There are several open issues for this case in the npm repository: npm install should recursively check/install dependencies (closed) local private module dependencies (closed) In the first one people list several workarounds that you … Read more

Do I need both package-lock.json and package.json?

Do you need both package-lock.json and package.json? No. Do you need the package.json? Yes. Can you have a project with only the package-lock.json? No. The package.json is used for more than dependencies – like defining project properties, description, author & license information, scripts, etc. The package-lock.json is solely used to lock dependencies to a specific … Read more

Npm audit fix –force react script downgrade automatically

One of the create-react-app maintainers has announced that they cannot fix this as the vulnerabilities affect transitive dependencies, and that it should not matter. The reasoning is that the npm audit feature was built with Node apps in mind, not build tools. Vulnerabilities in the dependencies should (in most cases) not translate to vulnerabilities in … Read more

How to fix SSL certificate error when running Npm on Windows?

TL;DR – Just run this and don’t disable your security: Replace existing certs # Windows/MacOS/Linux npm config set cafile “<path to your certificate file>” # Check the ‘cafile’ npm config get cafile or extend existing certs Set this environment variable to extend pre-defined certs: NODE_EXTRA_CA_CERTS to “<path to certificate file>” Full story I’ve had to … Read more