Louis
Louis

Reputation: 2608

Getting error installing ionic-native with npm

I am getting this npm / Angular error:

$ npm install ionic-native --save
[email protected] /home/louisro/Documents/mobileApps/BoardLine/ionic_version
├── UNMET PEER DEPENDENCY @angular/core@>=2.0.0-rc.0 <2.0.0-rc.5
└── [email protected] 

npm WARN @ionic/[email protected] requires a peer of @angular/core@>=2.0.0-rc.0 <2.0.0-rc.5 but none was installed.

How can I fix it?

Upvotes: 0

Views: 295

Answers (1)

raj
raj

Reputation: 6094

You could remove node_modules and reinstall packages with npm install. This would look for all the dependencies in dependencies attribute of package.json and install them.

How does package.json know the dependencies of your project? Well you asked it to ( or should have ). When you do npm install <pkg-name> --save it install the package in node_modules and --save adds it in package.json dependencies.

So an npm install would add all the packages back that are mentioned in package.json and its dependencies too. Hope it helps.

Upvotes: 1

Related Questions