Cannot create App with ionic start

i am having this error on ionic start appname tabs

npm.cmd i
npm ERR! Unexpected end of JSON input while parsing near ‘…“console-group”:"^0.3’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AB\AppData\Roaming\npm-cache_logs\2020-03-12T15_27_2
1_179Z-debug.log
[ERROR] An error occurred while running subprocess npm.

    npm.cmd i exited with exit code 1.

Hello,
Could you please post the logs?

91 timing stage:rollbackFailedOptional Completed in 1ms
92 timing stage:runTopLevelLifecycles Completed in 1942ms
93 verbose stack SyntaxError: Unexpected end of JSON input while parsing near ‘…“console-group”:"^0.3’
93 verbose stack at JSON.parse ()
93 verbose stack at parseJson (C:\Users\AB\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
93 verbose stack at consumeBody.call.then.buffer (C:\Users\AB\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
93 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
94 verbose cwd G:
95 verbose Windows_NT 6.3.9600
96 verbose argv “C:\Program Files\nodejs10\node.exe” “C:\Users\AB\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “install” “-g” “@angular/cli@latest”
97 verbose node v10.15.1
98 verbose npm v6.14.2
99 error Unexpected end of JSON input while parsing near ‘…“console-group”:"^0.3’
100 verbose exit [ 1, true ]

i have uninstalled angular
and trying to install latest version
“npm install -g @angular/cli@latest”
but same error
npm ERR! Unexpected end of JSON input while parsing near ‘…“console-group”:"^0.3’

it’s seem a problem installing dependencies maybe npm, try:

npm cache verify

EDIT (sorry):

npm cache clean --force

After try, again. maybe if you have “package.lock.json” delete it and try again.

I am not using any “package.lock.json”
trying to install angular

here is the result of npm clear cache --force
G:>npm clear cache --force
npm WARN using --force I sure hope you know what you are doing.

Usage: npm

where is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
C:\Users\AB.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

npm@6.14.2 C:\Users\AB\AppData\Roaming\npm\node_modules\npm

G:>npm install -g @angular/cli@latest
npm ERR! Unexpected end of JSON input while parsing near ‘…“console-group”:"^0.3’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AB\AppData\Roaming\npm-cache_logs\2020-03-12T18_41_12_395Z-debug.log

the only solution i found on npm but this is also not working
npm install -g console-group

I edit the previous answer, try with npm cache clear --force (sorry my bad)

1 Like

thanks @javierjsp @benetj