Publishing @progress/kendo-ui to nexus 3..5.1 npm pkg repository

237 views Asked by At

We've migrated from Nexus 3.01.01 to 3.5.1-02. In the process we had to migrate internally published npms. One of those is the kendo-ui (commercial one) from Telerik/Progress. We have downloaded the licensed copy from Telerik and publishing it to our local nexus for consumption by our developers.

However the publishing fails with an error during payload parsing. I can publish the same tar without an issue to the older (3.01.01) nexus, so the tar/payload it self is OK.

The error seem to be at the point of trying to parse the npm payload. I can also publish a demo/simple npm (both scoped and non-scoped) without an issue. Spend the whole day trying to figure this out with no luck - appreciate any pointers or advice.

2017-09-06 18:49:09,160+0800 WARN [qtp762281666-4116] MIDALLE org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: PUT /repository/npm-hosted/@progress%2fkendo-ui java.lang.IllegalStateException: Unexpected token VALUE_NULL at [Source: java.io.InputStreamReader@1ebad5c7; line: 1, column: 896] at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:150) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseObject(NpmPublishParser.java:174) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:136) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseObject(NpmPublishParser.java:174) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:136) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parsePackageRoot(NpmPublishParser.java:123) at com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parse(NpmPublishParser.java:98) at com.sonatype.nexus.repository.npm.internal.NpmRequestParser.parseNpmPublish(NpmRequestParser.java:81) at com.sonatype.nexus.repository.npm.internal.NpmRequestParser.parsePublish(NpmRequestParser.java:60) at com.sonatype.nexus.repository.npm.internal.NpmHostedFacetImpl.putPackage(NpmHostedFacetImpl.java:85) at com.sonatype.nexus.repository.npm.internal.NpmHandlers$3.handle(NpmHandlers.java:172) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)

Here's the gist for the full error from the nexus log.

2

There are 2 answers

0
Uchitha On

I got this to work however I'm still trying to figure out the impact of the change. Please be cautious if you apply the same 'hack' to get this to work. I had to do this, because there was several other project teams that was getting affected.

In a nutshell I had to strip out few keys from the package.json of the kendo-ui package. My analysis is that these settings makes npm issue a network call that fails in our constraint environment.

The package.json keys that I removed are as follows.

First section

 "_resolved": "https://registry.npm.telerik.com/@progress%2fkendo-ui/-/kendo-ui-2017.2.621.tgz",
 "_shasum": "09a652ead21700716dd5a50f9e86e9bffcea640e",
 "_shrinkwrap": null,

Second section

 "dist": {
   "shasum": "09a652ead21700716dd5a50f9e86e9bffcea640e",
   "tarball": "http://registry.npm.telerik.com/@progress%2fkendo-ui/-/kendo-ui-2017.2.621.tgz"
  },

I'd really appreciate if someone who know more about npm and npm definitions can inform the purpose of these settings in the package.json and potential impacts of removing them.

0
charlie_pl On

This issue was resolved in scope of https://issues.sonatype.org/browse/NEXUS-14385

Fix Version/s: 3.6.1

There was a problem with parsing null values in package.json