Unable to create a new Ionic app

I’m a new developer that has developed a few apps with Phonegap. I decided to start using Ionic, but ran into some issues while attempting to install Ionic and create a blank app.

Initially I was unable to install Ionic at all, with the command npm install -g cordova ionic throwing several errors. I updated Node and npm, cleared npm cache and ran the command again and it got successfully installed.

Now I have been trying to create a new app for a while now.
running ionic start test sidemenu gives the following result:

 F:\Workshops\Coding\Android>ionic start test sidemenu
√ Creating directory .\test - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
√ Downloading - done!
[INFO] Fetching starter template sidemenu (https://github.com/ionic-team/ionic2-starter-sidemenu/archive/master.tar.gz)
√ Downloading - done!
√ Updating package.json with app details - done!
√ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
× Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):

        npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
        sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw== integrity
        checksum failed when using sha512: wanted
        sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw== but got
        sha512-WLz1xvhCcG6K4SDQo0URza943iHRUSnY03o0D/BjBZXoIhmcwLePKQJ0GwjBh5iMpfeusKZa9rRHTaBfIRKyDQ==. (977675 bytes)
        npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: caniuse-lite@1.0.30000708 (node_modules\caniuse-lite):
        npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime
        'F:\Workshops\Coding\Android\test\node_modules\.staging\caniuse-lite-892710fe\data\regions\EE.js'
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: postcss@5.2.17 (node_modules\postcss):
        npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime
        'F:\Workshops\Coding\Android\test\node_modules\.staging\postcss-c12e25f8\lib\container.js'
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-js@2.4.1 (node_modules\core-js):
        npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime
        'F:\Workshops\Coding\Android\test\node_modules\.staging\core-js-69d7202d\client\library.min.js'

        npm ERR! code EINTEGRITY
        npm ERR! sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= integrity checksum failed when using sha1: wanted
        sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= but got sha1-k9N5JrJrtziywZfAyxGsEpckf/U=. (2238 bytes)

        npm ERR! A complete log of this run can be found in:
        npm ERR!     C:\Users\Aswin G\AppData\Roaming\npm-cache\_logs\2017-07-30T10_47_17_930Z-debug.log

I tried npm start test blank as well, but that also resulted in an error.

I tried again after running npm cache clear --force, but got the same error.

Here are some information regarding versions:

node -v
v6.11.1

npm -v
5.3.0

cordova -v
7.0.1

ionic -v
3.6.0

This is my first time installing both cordova and Ionic on this laptop, so older versions of both are unlikely to be present.
However, I have phonegap installed.

phonegap -v
6.5.0

On an unrelated note, the npm install command takes an exceptionally long time, about 20 minutes or more before giving the error.

I have been looking forward to using this for a while now, so please tell me how to solve this problem and properly get Ionic to work.

Something is messing with your internet connection. The downloaded files are not the ones that should be downloaded, and as npm checks this it complains.

That seemed to be the case. I tried again after midnight, when my internet is significantly faster, and the installation completed successfully. It failing earlier was still strange, because my internet had decent speed even then. Oh well.

Thanks for the help.