Reputation: 12935
I have a React-Native project and I'm trying to install certain npm modules in my project.
However, when I try to do so from the command line, the packages says it is installed correctly, but it is not appearing in the packages.json
dependency.
For instance, I installed react-relay
using npm install react-relay
.
The package looks to have installed correctly. But I check my packages.json
and react-relay
is not in there.
I have tried react-native link
, and the packages are not coming up.
What is going on?
Upvotes: 1
Views: 398
Reputation: 4232
You need to add save
option
npm install react-relay --save
or
npm i react-relay --s
To remove node module from package.json
file
npm uninstall react-relay --save
Here is documentation for npm install
Upvotes: 0
Reputation: 4993
you would need to use the "save" option: npm install react-relay --save
Upvotes: 3