Zanam
Zanam

Reputation: 4807

Stop create_react_app from re-installing global packages

I am not sure what to do about this as every time I use create_react_app it does

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

Even though I have checked that react, react-dom, and react-scripts packages already exist in global install location.

How do I stop create_react_app from reinstalling globally installed packages ?

Upvotes: 1

Views: 102

Answers (1)

M.Elkady
M.Elkady

Reputation: 1133

create_react_app uses npm and for npm packages, it should only be installed globally when it provides an executable command that you run from the shell (CLI). it's npm's way to keep all the applications packages inside the node_modules to avoid conflicts, npm is different compared by something like bundler if you used it before. so the simple answer this the right way of npm and it's not needed to be changed even if this might appear like a waste of resources

Upvotes: 1

Related Questions