Problem starting a new app ionic-v3

I am new to ionic and I get this error every time I try to start a new app:

C:\newProjects>ionic start app012 sidemenu
√ Preparing directory .\app012 - done!
√ Downloading and extracting sidemenu starter - done!
? Integrate your new app with Cordova to target native iOS and Android? No

Installing dependencies may take several minutes.

     *   IONIC  DEVAPP   *

 Speed up development with the Ionic DevApp, our fast, on-device testing mobile

  -     Test on iOS and Android without Native SDKs
  -     LiveReload for instant style and JS updates

 -->    Install DevApp:    <--


> npm i
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Br
owserslist >3.0 config used in other tools.
npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Pleas
e update to 4.x or newer
npm ERR! Unexpected end of JSON input while parsing near '":"latest","merge

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\public.ATK\AppData\Roaming\npm-cache\_logs\2018-08-20T12_0
[ERROR] An error occurred while running subprocess npm.

        npm i exited with exit code 1.

        Re-running this command with the --verbose flag may provide more
    throw new TypeError(

TypeError: Invalid data, chunk must be a string or buffer, not object
    at WriteStream.Socket.write (net.js:704:11)
    at process.<anonymous> (C:\Users\public.ATK\AppData\Roaming\npm\node_modules
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:108:22)
    at runMicrotasksCallback (internal/process/next_tick.js:124:9)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

you have probably wrong ended package.json file. Take a look at file if there isn`t extra comma or something like it

Remove ionic and install again

same here. Already uninstall/install ionic and check for commas but still error occured.
Ill paste my package.json for reference

  "name": "test1",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "~4.11.0",
    "@ionic-native/splash-screen": "~4.11.0",
    "@ionic-native/status-bar": "~4.11.0",
    "@ionic/storage": "2.1.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.6.2"
  "description": "An Ionic project"

I did, nothing changed.

I installed node.js then used:
npm install -g ionic
command to install ionic. I changed nothing, I did not edit any files, I did nothing else.
so how is that possible that a file could have wrong ending?

try clearing the cache, worked for me

npm cache clean --force

1 Like