Can't list or install themes/packages: node-gyp.js error


When I go to settings, I cannot see a list of Featured Packages, Featured Themes, or see a list of packages/themes.

The following error is displayed:
Fetching featured packages failed.
\AppData\Local\atom\app-1.10.2\resources\app\apm\bin\…\node_modules\node-gyp\bin\node-gyp.js was unexpected at this time.

I have tried uninstalling and reinstalling. I have tried uninstalling and removing the .atom and the atom folder in AppData, then reinstalling- no luck.


I was able to find a solution to this, although I’m not sure if there are any repercussions.

I edited \AppData\Local\atom\app-1.10.2\resources\app\apm\bin\apm.cmd

and commented out these lines:
::set maybe_node_gyp_path=%~dp0…\node_modules\node-gyp\bin\node-gyp.js
::if exist %maybe_node_gyp_path% (
::set npm_config_node_gyp=%maybe_node_gyp_path%