-2

Please I need your help whenever I try to install anything with npm I always get errors please help me. Error image

scrappedcola
  • 10,423
  • 1
  • 32
  • 43
Alswell
  • 1
  • 1
  • It's possibly a permissions take a look at : https://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository to see if it helps – scrappedcola Jul 08 '20 at 23:55

2 Answers2

1

Update

From what read from the docs you should install the @ionic/cli

$ npm install -g @ionic/cli

From the docs:

If there was a previous installation of the Ionic CLI, it will need to be uninstalled due to a change in package name.

$ npm uninstall -g ionic
$ npm install -g @ionic/cli

You may want to add debug info while installing e.g.:

$ npm install -dd -g @ionic/cli

From your screenshot not sure if there is an error with your GIT config, or permissions to install the ionic cli globally on your machine...


Outdated

There should not be a space between ionic and @4, you should run e.g.:

npm install -g ionic@4
cristobal
  • 462
  • 5
  • 14
  • @Alswell i updated this answer, not sure if it helps but from what i read from the ionic cli docs you should be installing the `@ionic/cli` package and not the `ionic` package. – cristobal Jul 09 '20 at 21:16
0

You can try with command like this npm install -g ionic@{{version}}. In the place of version you should put your prefered version.