I don't know where to put this, since Apache Cordova does not apparently allow public bug reports in Jira. Maybe someone here has reporting access to their site.
A couple days ago I tried installing "$npm install -g ionic cordova" in windows that resulted in neither being installed.
Yesterday I installed separately. $npm install -g ionic worked okay, but $npm install -g cordova gave me the error that I had previously. See below.
$npm install -g cordova
The installation failed at the attempt to copy someting called "abbrev" from a nonexistent ".staging" directory over to the global npm
It looks like a LOT of the installation modules got installed, but I worry that if "abbrev" was not the final one, it's failure to install (and the install abort) may have caused other modules not to be installed, which
could be a DISASTER. (See more below.) I actually HAVE a recent version of [email protected] installed (10/27/2016) package date . . . so I may have tried installing recently and the cordova package was only recently broken.
And no config files were installed in the top-level "cordova" directory! Another reason that the installation may be broken in a big way.
This is on Windows 7. I have the very latest stable Node and NPM installed (unless another was released in the last week).
SO: There is something seriously wrong with the "abbrev" package. It seems to believe that it was installed in a ".staging" directory that does not exist and hence cannot copy itself over
to the normal npm cache.
$ ionic --version
2.1.4
$ npm install -g cordova
C:\Users\pkosenko\AppData\Roaming\npm
`-- (empty)
..... [many nodules show being installed here]
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\Program Files\nodejs\node.exe" "C:\Users\pkosenko\AppData\Roaming\npm\
\node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v6.8.0
npm ERR! npm v3.10.9
npm ERR! path C:\Users\pkosenko\AppData\Roaming\npm\node_modules.staging\abbrev-f7f922e4
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\pkosenko\AppData\Roaming\npm
\node_modules.staging\abbrev-f7f922e4' -> 'C:\Users\pkosenko\AppData\Roa
ming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\pkosenko\AppData\Roaming\npm
\node_modules.staging\abbrev-f7f922e4' -> 'C:\Users\pkosenko\AppData\Roa
ming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\pkosenko\npm-debug.log
npm ERR! code 1
pkosenko@PETER-KOSENKO ~
$
I used to have the same problem but on OSX , I fix it by uninstall ionic and cordova then install them again.
npm uninstall -g cordova ionic
npm install -g cordova ionic
Try the Cordova slack channel as well for support queries
Thanks for the help. That worked. The ionic part of the installation was okay. It was Cordova that was giving the problem. So, since I installed ionic separately yesterday, today I just uninstalled and reinstalled just Cordova. I wonder what the problem is. Something in Cordova update seems not to quite be working with my latest bleeding edge NPM? I was beginning to think that the problem is that NPM is not completely bullet-proofed for backward compatibility . . . which having to uninstall/reinstall would seem to suggest.
In any case, uninstall/reinstall worked. Thanks.
Hello, thanks for using Ionic! @pkosenko were you able to open an issue with the cordova team? Also, what version of cordova are you running?
I am using now the very latest cordova. I was installing Ionic 2.
$ npm list -g cordova
[..................] - : info using [email protected]
+-- [email protected]
"_id": "[email protected]", (from package.json)
Unfortunately, I cannot tell you what version of Cordova I HAD, since I had to UNINSTALL it to get the latest cordova to install. But it was a version of cordova that was packaged with Ionic 1.
And I suspect that it might be something about NPM that was unable to update to cordova 6.4.0
$ npm --version
3.10.9
Glad to hear that it was solved, sorry that you had issues.
I had installed ionic earlier on on my windows 10 system, and ionic -serve failed, So I resulted in uninstalling ionic cordova which till date has resulted in ionic not responding, but cordova is working perfectly. Before I forget, today I installed cordova ionic and it was moved to my npm-cache directory. I need to use ionic badly, but I am getting fed up already.
Most helpful comment
I used to have the same problem but on OSX , I fix it by uninstall ionic and cordova then install them again.
npm uninstall -g cordova ionic
npm install -g cordova ionic