kplus kplus - 1 year ago 83
Node.js Question

npm not responding after changing the prefix

I tried updating my IONIC CLI through the npm recently, the installation were successful a couple of time but the CLI version did not change. After a research I decided to change the npm prefix, then the IONIC strated throwing up bash: IONIC command not found. Then I did a further research after which I edited the npm config through windows cmd admin. I did

npm cofig edit

I changed the prefix to


since then, npm no longer respond.

if I run something like

npm install -g ionic

nothing happens, no errors nor any form of response.
I have uninstall and reinstall the node several time. I am using node V4.2.2.

Answer Source

I finally found a way around this . These are what I did

  1. I deleted all the node_module folders in all my application (I am not sure if this is really necessary )

  2. I did a complete uninstall of the node by following

  3. I ran

    npm root -g

    which returns the path


    instead of


    or wherever node is installed , in my own case node is install in


    I then ran

      npm config set prefix "C:\Users\<username>\AppData\Roaming\npm"

Then I reinstalled cordova and ionic again

    npm install  -g cordova
      npm install ionic -g

and all is well again

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download