npm ERR! registry error parsing json

registry
priority:critical
triaged

(Qiming Zhao) #1

What I Wanted to Do

Publish module.

What Happened Instead

500 error on last attempt: SyntaxError: Unexpected token A in JSON at position 0

Reproduction Steps

npm publish -d

Details

npm info lifecycle eslint-server@0.1.3~prebuild: eslint-server@0.1.3
npm info lifecycle eslint-server@0.1.3~build: eslint-server@0.1.3

eslint-server@0.1.3 build /home/chemzqm/nodejs/eslint-server
tsc -p tsconfig.json

npm info lifecycle eslint-server@0.1.3~postbuild: eslint-server@0.1.3
npm info ok
npm info lifecycle eslint-server@0.1.3~prepare: eslint-server@0.1.3
npm info lifecycle eslint-server@0.1.3~prepublishOnly: eslint-server@0.1.3
npm info lifecycle eslint-server@0.1.3~prepack: eslint-server@0.1.3
npm info lifecycle eslint-server@0.1.3~postpack: eslint-server@0.1.3
npm info attempt registry request try #1 at 14:38:44
npm http request PUT https://registry.npmjs.org/eslint-server
npm http 500 https://registry.npmjs.org/eslint-server
npm ERR! registry error parsing json
npm info retry will retry, error on last attempt: SyntaxError: Unexpected token A in JSON at position 0
npm info retry An error occurred
npm info attempt registry request try #2 at 14:38:54
npm http request PUT https://registry.npmjs.org/eslint-server
npm http 500 https://registry.npmjs.org/eslint-server
npm ERR! registry error parsing json
npm info retry will retry, error on las

Platform Info

$ npm --versions
{ 'vscode-clang': '0.2.2',
  npm: '6.1.0',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.6.0',
  openssl: '1.1.0h',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.21.0',
  v8: '6.7.288.46-node.13',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

I tried to publish different modules, and tried on different servers, login account again, still get same issue.


npm ERR! error parsing json
(Alexanderknapstein) #2

Hey @chemzqm,

we found out, that our package.json was not valid. After fixing that, we could publish again.
see here: http://package-json-validator.com/

Cheers, Alex


(Kat Marchán) #3

https://status.npmjs.org/incidents/jq56nmrggd33

There is an active incident regarding publishes. Please subscribe above for further updates.

Update: publishes should be working again, and the incident report has been updated accordingly.


(Kat Marchán) #4