0

I got the below error on call npm publish. I was trying publish an existing package on private feed:

npm ERR! Unexpected token u in JSON at position 0

My package.json:

{
  "name": "XXXXXXXXXXXX",
  "version": "0.0.6",
  "description": "XXXXXXXXXXXX",
  "types": "./types/index.d.ts",
  "repository": {
    "type": "git",
    "url": "XXXXXXXXXXXX"
  },
  "engines": {
    "cordovaDependencies": {
      "0.2.3": {
        "cordova": ">=3.1.0"
      },
      "4.0.0": {
        "cordova": ">100"
      }
    }
  }
}
Gilberto Alexandre
  • 2,227
  • 1
  • 18
  • 20

1 Answers1

0

To me, its happened because of the "engines" group in package.json. I removed it, and npm publish works.

Gilberto Alexandre
  • 2,227
  • 1
  • 18
  • 20