ENOGIT on trying to start an Ionic2 project

I am having problems creating a new Ionic2 project. I followed exactly the Installing Ionic for version 2 found here https://ionicframework.com/docs/v2/getting-started/installation/ and get the below error.

  1. I ran: ionic start myFirstProject --v2
    2.Same thing happens with: ionic start myFirstProject blank --v2
Creating Ionic app in folder /devops/myFirstProject based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip
[=============================]  100%  0.0s
Installing npm packages...
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  driftyco/localforage-cordovasqlitedriver#9803562a61c2172a69f3475f97e98922c0b49ac0 resetting remote /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-f7bfd5d6 because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror git://github.com/driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-f7bfd5d6: undefined
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror git://github.com/driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-f7bfd5d6: undefined
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  driftyco/localforage-cordovasqlitedriver#9803562a61c2172a69f3475f97e98922c0b49ac0 resetting remote /home/oem/.npm/_git-remotes/git-https-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-e715d57c because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror https://github.com/driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-https-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-e715d57c: undefined
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror https://github.com/driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-https-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-e715d57c: undefined
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit  driftyco/localforage-cordovasqlitedriver#9803562a61c2172a69f3475f97e98922c0b49ac0 resetting remote /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-97e37af2 because of error: { Error: not found: git
npm WARN addRemoteGit     at getNotFoundError (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit     at F (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit     at E (/home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit     at /home/oem/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror git@github.com:driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-97e37af2: undefined
npm ERR! git clone --template=/home/oem/.npm/_git-remotes/_templates --mirror git@github.com:driftyco/localforage-cordovasqlitedriver.git /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-97e37af2: undefined
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/home/oem/.nvm/versions/node/v6.9.1/bin/node" "/home/oem/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9
npm ERR! code ENOGIT

npm ERR! not found: git
npm ERR! 
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! Please include the following file with any support request:
npm ERR!     /alfdev/myFirstProject/npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
 undefined 

I would guess you need to install git.

Well, first, if I try without --v2, it works just fine.
Now, I installed the git and still after that, I got this error

Creating Ionic app in folder /devops/myFirstProject based on blank project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-blank/archive/master.zip
[=============================]  100%  0.0s
Installing npm packages...
npm WARN addRemoteGit Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit  driftyco/localforage-cordovasqlitedriver#9803562a61c2172a69f3475f97e98922c0b49ac0 resetting remote /home/oem/.npm/_git-remotes/git-github-com-driftyco-localforage-cordovasqlitedriver-git-9803562a61c2172a69f3475f97e98922c0b49ac0-f7bfd5d6 because of error: { Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:498:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git config --get remote.origin.url' }
npm WARN prefer global node-gyp@3.4.0 should be installed with -g

> node-sass@3.9.3 install /devops/myFirstProject/node_modules/node-sass
> node scripts/install.js

Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.9.3/linux-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.9.3/linux-x64-48_binding.node": 

getaddrinfo EAI_AGAIN github-cloud.s3.amazonaws.com:443

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@3.9.3 postinstall /devops/myFirstProject/node_modules/node-sass
> node scripts/build.js

Building: /home/oem/.nvm/versions/node/v6.9.1/bin/node /devops/myFirstProject/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/home/oem/.nvm/versions/node/v6.9.1/bin/node',
gyp verb cli   '/devops/myFirstProject/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.4.0
gyp info using node@6.9.1 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 6.9.1
gyp verb command install [ '6.9.1' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp verb install input version string "6.9.1"
gyp verb install installing version: 6.9.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 6.9.1
gyp verb ensuring nodedir is created /home/oem/.node-gyp/6.9.1
gyp verb created nodedir /home/oem/.node-gyp
gyp http GET https://nodejs.org/dist/v6.9.1/node-v6.9.1-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '6.9.1' ]
gyp verb remove using node-gyp dir: /home/oem/.node-gyp
gyp verb remove removing target version: 6.9.1
gyp verb remove removing development files for version: 6.9.1
gyp ERR! configure error 
gyp ERR! stack Error: getaddrinfo EAI_AGAIN nodejs.org:443
gyp ERR! stack     at Object.exports._errnoException (util.js:1026:11)
gyp ERR! stack     at errnoException (dns.js:33:15)
gyp ERR! stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
gyp ERR! System Linux 4.4.0-21-generic
gyp ERR! command "/home/oem/.nvm/versions/node/v6.9.1/bin/node" "/devops/myFirstProject/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /devops/myFirstProject/node_modules/node-sass
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
Build failed
ionic-app-base@ /devops/myFirstProject
├── @angular/common@2.0.0 
├── @angular/compiler@2.0.0 
├─┬ @angular/compiler-cli@0.6.2 
│ ├─┬ @angular/tsc-wrapped@0.3.0 
│ │ └─┬ tsickle@0.1.7 
│ │   ├─┬ mkdirp@0.5.1 
│ │   │ └── minimist@0.0.8 
│ │   ├─┬ source-map@0.4.4 
│ │   │ └── amdefine@1.0.0 
│ │   └─┬ source-map-support@0.3.3 
│ │     └── source-map@0.1.32 
│ ├── minimist@1.2.0 
│ ├── parse5@1.3.2 
│ └── reflect-metadata@0.1.8 
├── @angular/core@2.0.0 
├── @angular/forms@2.0.0 
├── @angular/http@2.0.0 
├── @angular/platform-browser@2.0.0 
├── @angular/platform-browser-dynamic@2.0.0 
├── @angular/platform-server@2.0.0 
├─┬ @ionic/storage@1.0.3 
│ ├─┬ localforage@1.4.3 
│ │ └─┬ lie@3.0.2 
│ │   ├─┬ es3ify@0.1.4 
│ │   │ ├── esprima-fb@3001.1.0-dev-harmony-fb 
│ │   │ ├─┬ jstransform@3.0.0 
│ │   │ │ ├── base62@0.1.1 
│ │   │ │ └── source-map@0.1.31 
│ │   │ └── through@2.3.8 
│ │   ├── immediate@3.0.6 
│ │   ├─┬ inline-process-browser@1.0.0 
│ │   │ ├─┬ falafel@1.2.0 
│ │   │ │ ├── acorn@1.2.2 
│ │   │ │ ├── foreach@2.0.5 
│ │   │ │ ├── isarray@0.0.1 
│ │   │ │ └── object-keys@1.0.11 
│ │   │ └─┬ through2@0.6.5 
│ │   │   ├─┬ readable-stream@1.0.34 
│ │   │   │ ├── core-util-is@1.0.2 
│ │   │   │ ├── inherits@2.0.3 
│ │   │   │ └── string_decoder@0.10.31 
│ │   │   └── xtend@4.0.1 
│ │   └─┬ unreachable-branch-transform@0.3.0 
│ │     ├── esmangle-evaluator@1.0.1 
│ │     └─┬ recast@0.10.43 
│ │       ├── ast-types@0.8.15 
│ │       ├── esprima-fb@15001.1001.0-dev-harmony-fb 
│ │       ├── private@0.1.6 
│ │       └── source-map@0.5.6 
│ └── localforage-cordovasqlitedriver@1.4.6  (git://github.com/driftyco/localforage-cordovasqlitedriver.git#9803562a61c2172a69f3475f97e98922c0b49ac0)
├── d@0.1.1  extraneous
├── ionic-angular@2.0.0-rc.1 
├── ionic-native@2.2.3 
├── ionicons@3.0.0 
├─┬ rxjs@5.0.0-beta.12 
│ └── symbol-observable@1.0.4 
├── typescript@2.0.6 
└── zone.js@0.6.21 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/home/oem/.nvm/versions/node/v6.9.1/bin/node" "/home/oem/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /devops/myFirstProject/npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
 undefined 

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

Just read the error message. Are you behind a firewall?

We had problems at the network with the DNS, it timed out the look up.

Once installing git, and connecting to a different network, everything worked fine.

Question though, why did it work without git when I didn’t add the --V2 ?