Reputation: 59004
It takes hours to install every needy dependency when starting a new project in React native. Can i install npm dependency globally (lets say npm install --save react-navigation
), so that i can use this in new projects.
I have read https://docs.npmjs.com/getting-started/installing-npm-packages-globally, i don't know if it is that i am searching for.
Please tell full flow, as i am not experienced in React native.
Upvotes: 1
Views: 1894
Reputation: 3184
Why don't you use yarn? It caches every module it ever downloads. It solves your problem in a better way. You don't need to install it globally.
It also links your packages as an add on. It is lightning fast, secure and reliable.
As you have asked for the full flow : yarn is a package manager same as npm with extra features. Install it and just run the command yarn from your root directory. It installs all the dependencies from your package.json file.
Upvotes: 3