'How to change the npm prefix without config?

I accidentally changed the npm prefix to a place that doesn't exist. Is there a configuration file I can access that would allow me to change this back?

The only options I can think of are:

  1. Completely Uninstall Node (npm not responding after changing the prefix)
  2. I guess I could create the directories that don't exist and move the npm files there.

But it seems like there should be a config file I can change somewhere, right?



Solution 1:[1]

A Simple ln -s /usr/local/bin/n /usr/bin/n has fixed the issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Unlimited