You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 0)): has to be escaped using backslash to be included in string value at [Source: (BufferedInputStream); line: 1, column: 2103] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1798) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663) at com.fasterxml.jackson.core.base.ParserMinimalBase._throwUnquotedSpace(ParserMinimalBase.java:627) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2479) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2408)
In nexus there is strict validation of json files while installing them on local repos. The package installation works fine when installed independently using npm i. But it gives JSON parsing error while installing package via Nexus.
The text was updated successfully, but these errors were encountered:
I "fixed" the issue by deleting the package from the proxy a re-publishing it in our own repository after cleaning the package.json file (just did "Remove whitespaces" on http://jsonviewer.stack.hu/).
It is clearly a problem with an invisible character somewhere, perhaps a BOM at the begining of the file.
npm ERR! Unexpected token in JSON at position 2100
npm ERR! {"_id":"protoduck","_rev":"12-f055a178db3959d03406b3994f0226c8","name":"protoduck","description":"Fancy duck typing for the most serious of ducks.","dist-tags":{"latest":"5.0.1"}
Finally fixed this.
I had an old version of npm hanging around (3.5.2) so I just update my node installation to the latest stable version and it was all fixed.
We are getting below mentioned invalid JSON error while installing the latest (5.0.1) version of protoduck npm package from Nexus.
2019-02-26 04:11:04,473+0000 WARN [qtp365971833-490] admin org.sonatype.nexus.repository.npm.internal.NpmHandlers - Error: GET /protoduck: Status{successful=false, code=404, message='Not Found'} - Invalid JSON input org.sonatype.nexus.repository.InvalidContentException: Invalid JSON input at org.sonatype.nexus.repository.npm.internal.NpmJsonUtils.parse(NpmJsonUtils.java:88)
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 0)): has to be escaped using backslash to be included in string value at [Source: (BufferedInputStream); line: 1, column: 2103] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1798) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663) at com.fasterxml.jackson.core.base.ParserMinimalBase._throwUnquotedSpace(ParserMinimalBase.java:627) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2479) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2408)
In nexus there is strict validation of json files while installing them on local repos. The package installation works fine when installed independently using npm i. But it gives JSON parsing error while installing package via Nexus.
The text was updated successfully, but these errors were encountered: