Can't `ionic start` on windows 10

Hi dudes I find a solution:

I have been working with Ionic since May with some build problems, but today when I tried to create a new starter project by:


ionic start myApp tabs

I just received:

[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 ERR! code 128
    npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
    npm ERR! fatal: 'submodule' appears to be a git command, but we were not
    npm ERR! able to execute it. Maybe git-submodule is broken?

I tried all (like some people there), to update the whole npm, npm gtit, git, ionic, cordova, etc… And also I tried to skip git with --git flag. But the one way to resolve the issue was the following sequence:

ionic start myApp [tabs/blank/menu] --skip-deps

and then

cd myApp

npm install

Windows10 64b
npm 5.0.3
ionic 3.4.0
Cordova 7.0.1

Good luck dudes.

2 Likes

That did work for me as well

1 Like

that did work fine unitl the input npm install


C:\Users\GABRIEL>ionic start myApp [tabs/blank/menu] --skip-deps
? The directory myApp contains file(s) that could conflict. Would you like to o
verwrite the directory with this new project? Yes
✖ Creating directory .\myApp - failed!
Unable to find starter template for [tabs/blank/menu]


C:\Users\GABRIEL>ionic start myApp [tabs/blank/menu] --skip-deps
Unable to find starter template for [tabs/blank/menu]


C:\Users\GABRIEL>ionic start firstApp [tabs/blank/menu] --skip-deps
✖ Creating directory .\firstApp - failed!
Unable to find starter template for [tabs/blank/menu]


C:\Users\GABRIEL>ionic start firstApp [tabs/menu] --skip-deps
Unable to find starter template for [tabs/menu]


C:\Users\GABRIEL>
C:\Users\GABRIEL>ionic start firstApp --skip-deps
? What starter would you like to use: blank
[INFO] Fetching app base
       (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
✔ Downloading - done!
[INFO] Fetching starter template blank
       (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
✔ Downloading - done!
✔ Updating package.json with app details - done!
✔ Creating configuration file ionic.config.json - done!
> git init
✔ Running command - done!
> git add -A
✔ Running command - done!
> git commit -m "Initial commit" --no-gpg-sign
✔ Running command - done!

♬ ♫ ♬ ♫  Your Ionic app is ready to go! ♬ ♫ ♬ ♫

Run your app in the browser (great for initial development):
  ionic serve

Run on a device or simulator:
  ionic cordova run ios

Test and share your app on a device with the Ionic View app:
  http://view.ionic.io

? Link this app to your Ionic Dashboard to use tools like Ionic View? Yes

You will need to login in order to link this app. Please run the following commands to do so.
  ionic login - login first
  ionic link - then link your app

Go to your newly created project: cd .\firstApp

C:\Users\GABRIEL>cd firstApp

C:\Users\GABRIEL\firstApp>npm install
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chokidar@1.7.0 (node_modules\chokidar):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\chokidar-bf12ecbf\lib\nodefs-handler.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rollup@0.42.0 (node_modules\rollup):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\rollup-1ae93678\bin\rollup'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: autoprefixer@7.1.1 (node_modules\autoprefixer):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\autoprefixer-2910177f\lib\selector.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: tslint-eslint-rules@4.1.1 (node_modules\tslint-eslint-rules):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\tslint-eslint-rules-7a8df5d7\dist\rules\spaceInParensRule.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: tslint@5.2.0 (node_modules\tslint):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\tslint-92722b4c\lib\rules\alignRule.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rollup-plugin-node-builtins@2.1.2 (node_modules\rollup-plugin-node-builtins):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\rollup-plugin-node-builtins-8a1084b9\src\es6\zlib-lib\binding.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: webpack@2.6.1 (node_modules\webpack):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\webpack-7969b247\lib\dependencies\ImportContextDependency.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: uglify-js@2.8.27 (node_modules\uglify-js):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\uglify-js-2b083f83\lib\compress.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 (node_modules\node-sass):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\GABRIEL\firstApp\node_modules\.staging\node-sass-f1fa52da\src\libsass\src\plugins.cpp'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir 'C:\Users\GABRIEL\firstApp\node_modules\.staging\fsevents-98cd5b1b\node_modules\jodid25519'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: C:\Users\GABRIEL\firstApp\node_modules\.staging\fsevents-98cd5b1b\node_modules\jodid25519
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clean-css@3.4.27 (node_modules\clean-css):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sha1-re91sxwWD/pdcvTeZ5ZuJmDBolU= integrity checksum failed when using sha1: wanted sha1-re91sxwWD/pdcvTeZ5ZuJmDBolU= but got sha1-BQxriqy+XANXujCt+5XoKnK+CPQ=. (4995 bytes)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-js@2.4.1 (node_modules\core-js):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir 'C:\Users\GABRIEL\firstApp\node_modules\.staging\core-js-e75f556b\library\fn\string\virtual'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: C:\Users\GABRIEL\firstApp\node_modules\.staging\core-js-e75f556b\library\fn\string\virtual

npm ERR! code EINTEGRITY
npm ERR! sha1-PTgyGCgjHkNPKHUUlZw3qCtin0I= integrity checksum failed when using sha1: wanted sha1-PTgyGCgjHkNPKHUUlZw3qCtin0I= but got sha1-pCLgbn6TgP3p9C3hc9/O+XZ1zG8=. (245234 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\GABRIEL\AppData\Roaming\npm-cache\_logs\2017-06-27T15_52_15_927Z-debug.log

Hey yall we’re aware of the error and will be fixing this. Sorry for any issues!

3 Likes

Can we follow the progress of the fix somewhere or do you know a way to get around the error?

You should configure your git globaly.

git config --global user.email "email@example.com"
git config --global user.name “Your Name”

This works for me.

2 Likes

That did work for me, but still doesn’t explain why it worked for weeks before setting this

The solution for me on Windows 8 by doing downgrade git to version 1.9.5.

I created an issue for this at https://github.com/ionic-team/ionic-cli/issues/2477 now. Please add your error messages and reports if yours are similar but not identical.

Here is another topic on this:

Update git to the last version of git. Done lik said above:

git config --global user.email "email@example.com"
git config --global user.name “Your Name”

and launched a new ionic project with the git cmd. Worked for me :smiley:

There were multiple releases of @ionic/app-scripts to fix this - starting a new project should now work again.

@gorgonwo, @Dragon, @ralphskie, @kocei, @nyffellare, @sanjib_dev, @Ucas_rajeshm, @marcocab, @mosesmatt, @stardigits Can you confirm that it now works without special hacks or software again?

1 Like

Working fine for me now. Thanks

1 Like

It’s working now. Thank you!

1 Like

It works like charm now! =D
Thank you!!

I don’t know what I’m doing wrong but I cant get it working on my side:

C:\Users\Graphefruit\Documents\playground\myApp>cd …

C:\Users\Graphefruit\Documents\playground>git config --global user.email “XX”

C:\Users\Graphefruit\Documents\playground>git config --global user.name “XX”

C:\Users\Graphefruit\Documents\playground>ionic start b

? What starter would you like to use: blank
V Creating directory .\b - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
V Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
V Downloading - done!
V Updating package.json with app details - done!
V Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!

npm install
/ Running command

Results always in:
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Graphefruit\AppData\Roaming\npm-cache_logs\2017-09-20T09_37_50_650Z-debug.log

Information:
NPM: { npm: ‘5.4.2’,
ares: ‘1.10.1-DEV’,
http_parser: '2.7.0
icu: ‘58.2’,
modules: ‘48’,
node: ‘6.11.3’,
openssl: ‘1.0.2l’,
uv: ‘1.11.0’,
v8: ‘5.1.281.107’,
zlib: ‘1.2.11’ }

Ionic:
version: ‘3.10.3’

Cordova:
version: ‘7.0.1’

Git:
git version 2.14.1.windows.1

I’ve already uninstalled everything, and reinstalled.
Also I’ve updated NPM from 5.X to 6.X.

The trick with --skip-deps, installed it, but after that when I ran npm install, it results again in a crash.

Setting the username and email to git isn’t working aswell.

Removing and installing: npm install -g object-keys - works, but should this not just be an workaround?

Operating system: Windows 8.1

Anyone an idea?

Thanks in advance

I’m getting the same thing too. I’ve been able to start all other example Ionic starters except the conference one. It errors on “Could not read from remote repository”.

Just to clarify, I can start all other demo examples except for conference

Here is the output:

D:\Tests\Ionic-Pro>ionic start --pro-id <id>
[INFO] Using ionic-conference for name.

? What starter would you like to use: conference
√ Creating directory .\ionic-conference - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
√ Downloading - done!
[INFO] Fetching starter template conference (https://github.com/ionic-team/ionic-conference-app/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 ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:
        Cloning into
        'C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1'...
        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:
        git-upload-pack 'C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322':
        git-upload-pack: command not found
        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:
        fatal: Could not read from remote repository.
        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:

        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:
        Please make sure you have the correct access rights
        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:
        and the repository exists.
        npm ERR! git clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1:

        npm ERR! Windows_NT 10.0.15063
        npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
        Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
        npm ERR! node v6.11.1
        npm ERR! npm  v3.10.10
        npm ERR! code 128

        npm ERR! Command failed: git -c core.longpaths=true clone C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322
        C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1
        npm ERR! Cloning into
        'C:\Users\REDACTED\AppData\Local\Temp\npm-4372-41c74435\git-cache-1097edd5\1cb767dbc775ae8ae7dcafa7c27ca2c6b90c21c1'...
        npm ERR! git-upload-pack 'C:\Users\REDACTED\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-ionic-team-cordova-plugin-wkwebview-engine-git-ae2e0322':
        git-upload-pack: command not found
        npm ERR! fatal: Could not read from remote repository.
        npm ERR!
        npm ERR! Please make sure you have the correct access rights
        npm ERR! and the repository exists.
        npm ERR!
        npm ERR!
        npm ERR! If you need help, you may report this error at:
        npm ERR!     <https://github.com/npm/npm/issues>

        npm ERR! Please include the following file with any support request:
        npm ERR!     D:\Tests\Ionic-Pro\ionic-conference\npm-debug.log


I had the same problem and it is solved if the run the ionic commands from git Bash. The other option to get it working from cmd as well is to add your git usr bin folder to Windows Path variable.

Hi how fid you got it working? Please help!