Apm update error with npm


#1

I have atom working fine for some months on a windows 7 box and have been able to install and update packages.

Recently I moved to git for windows and started using 2.3.7 version.

Possibly this has caused me to not be able to update packages.

Here is an error I have gotten for atom-beautify.

A:>apm update atom-beautify
Package Updates Available (1)
└── atom-beautify 0.24.1 -> 0.27.0

Would you like to install these updates? (yes) yes

Installing atom-beautify@0.27.0 to A:\Apps.atom\packages failed

npm ERR! git fetch -a origin (https://github.com/ariya/esprima.git)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv “A:\AppData\atom\app-0.196.0\resources\app\apm\bin\\node.exe” “A:\AppData\atom\app-0.196.0\resources\app\apm\node_modules\npm\bin\npm-cli.js” “–globalconfig” “A:\App
s\.atom\.apm\.apmrc” “–userconfig” “A:\Apps\.atom\.apmrc” “install” “D:\Users\ASIDDI~1\AppData\Local\Temp\d-11546-17916-1ujbhlu\package.tgz” “–target=0.22.0” “–arch=ia32” "–msvs_versi
on=2013"
npm ERR! node v0.10.35
npm ERR! npm v2.5.1
npm ERR! code 128

npm ERR! Command failed:
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues

Not sure how to resolve the issue.


#2

What happens if you type git -v in a terminal. You have to have git working on the command-line.


#3
A:\>git -v
Unknown option: -v
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

A:\>git --version
git version 2.4.0.windows.1

A:\>

#4

Reinstalled python, node, git but that did not help.

I was able to remove the package without error.

Then when I try to install it I get a similar error.

A:\>apm install atom-beautify
Installing atom-beautify to A:\Apps\.atom\packages failed

npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/ariya/esprima.git)
npm ERR! git clone https://github.com/ariya/esprima.git Cloning into bare repository 'A:\Apps\.atom\.apm\_git-remotes\https-github-com-ariya-esprima-git-1bd370f9'...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "A:\\AppData\\atom\\app-0.196.0\\resources\\app\\apm\\bin\\\\node.exe" "A:\\AppData\\atom\\app-0.196.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "A:\\App
s\\.atom\\.apm\\.apmrc" "--userconfig" "A:\\Apps\\.atom\\.apmrc" "install" "D:\\Users\\ASIDDI~1\\AppData\\Local\\Temp\\d-11546-19248-1lpsczr\\package.tgz" "--target=0.22.0" "--arch=ia32" "--msvs_versi
on=2013"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code 128

npm ERR! Command failed: Cloning into bare repository 'A:\Apps\.atom\.apm\_git-remotes\https-github-com-ariya-esprima-git-1bd370f9'...
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

#5

Look at the error log; seems like something is horribly wrong with your environment. Almost as if you’ve got Git configured to a hardcoded repo URL—https://github.com/ariya/esprima.git. Delete (or rename) your global Git config file. It should be stored in your home directory C:\Users\yourusername\.gitconfig.


#6

It does not look like I have anything hardcoded in the gitconfig

Here is what I have

A:\>git config --global --list
fatal: unable to read config file 'D:\Users\username/.gitconfig': No such file or directory

A:\>h:

H:\>dir
 Volume in drive H is System Reserved
 Volume Serial Number is 9CC4-EA9F

 Directory of H:\

05/01/2015  09:42 AM               105 .gitconfig
04/08/2015  12:48 PM                 0 .Rhistory
04/28/2015  10:07 AM    <DIR>          .ssh
12/02/2014  05:22 PM    <DIR>          .VirtualBox
04/20/2015  01:45 PM               509 _viminfo
               3 File(s)            614 bytes
               2 Dir(s)      74,649,600 bytes free

H:\>more .gitconfig
[user]
        name = user name
        email = useremail@email.com
[core]
        autocrlf = true
        safecrlf = true

H:\>

#7

Why are you running commands from the A: drive? Last I checked, A: and B: were “reserved” for floppy drives? It seems to think there’s an A:\Apps directory? Which seems weird. Shouldn’t all the paths that it is referencing be on the C: or D: drives?

Did you download your version of Git from http://git-scm.com?

http://git-scm.com/download/win


#8

I have my Apps folder and documents folder etc on my A drive.

I downloaded git from http://git-for-windows.github.io/


#9

I’d try using the official version of Git that I linked to and see if that fixes the problem.