How can I install older PhoneGap versions using th

2020-03-02 04:26发布

问题:

How can I install an older version of PhoneGap using a command line?

I am familiar with the following installation command:

"$ sudo npm install -g phonegap"

This however only installs the latest version.

回答1:

npm install -g phonegap@<version>

You need to know the exact version number, but this should work. More info at the following link.

https://www.npmjs.org/doc/cli/npm-install.html



回答2:

I'm sure there is a better way but I use the commits section on the Phonegap Github page to snag the actual old version numbers -

https://github.com/phonegap/phonegap-cli/commits/master