Reputation: 1791
I missed up my npm after running npm config set python /path/to/executable/python2.7
command. now when I try to install a package to my repository I get the following error
gyp ERR! stack Error: Can't find Python executable "node6.10.2", you can set the PYTHON env variable
How can I reset my npm? I tried removing it using the following command
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
and then downloaded node.js from their official website but it didn't resolve the error
Upvotes: 1
Views: 6944
Reputation: 1791
I fixed it by running npm config edit
command and removed the first line below:
registry=https://registry.npmjs.org/
that was saying python=/path/to/executable/python2.7
hope It helps
Upvotes: 1
Reputation: 183
Try npm config delete config_name
This is for delete npm config.
Or you can npm config set config_name=default_value
If you wanna set to default value.
All your npm config can be view in .npmrc file.
Upvotes: 2