Marginal NPM artifact uploads remotely, not locally

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Marginal NPM artifact uploads remotely, not locally

rmandeville
We are running Artifactory Pro 4.5.1 rev 40117 on Ubuntu Trusty Tahr, and are having troubles with an NPM local repository.

For stability purposes, we don't allow our official builds to reach out to the internet, or even use a remote Artifactory repository; we must use Artifactory local repositories.  Any artifacts our build needs must be uploaded to these repositories.

We use the JSONLint NPM package.  This has a dependency on another package called JSV.  JSV, however, has a tiny problem.  Its package.json has "dependencies" set to "[]", and the standard appears to be a hash ("{}") rather than an array ("[]").

Artifactory has no problem pulling JSV into a remote repository from the internet.  However, if you try to upload a copy to a local repo, you get the following error:

Cannot deploy file JSV-4.0.2.tgz. Cause: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source: org.apache.commons.compress.archivers.tar.TarArchiveInputStream@485b0d83; line: 28, column: 3] (through reference chain: org.jfrog.repomd.npm.model.NpmMetadata["dependencies"])

Is there any way to get JSV-4.0.2 into a local Artifactory NPM repository?

Before anyone asks, a bug fix to JSV is unlikely: 4.0.2 is the latest and only release, published in 2012.
Reply | Threaded
Open this post in threaded view
|

Re: Marginal NPM artifact uploads remotely, not locally

shayb
Hi,

From the npm documentation, it seems that the dependencies should always be wrapped with curly bracket {}. 
What about repacking the package and replace the [] with {}? if you have the sources, you can just modify the package.json file and rebuild it, if you only have the archive, you can repack it with modifying the internal package.json file (the one that inside the archive) and upload it to Artifactory using the Web-UI.

Shay

On Tue, Jul 12, 2016 at 2:04 PM, rmandeville [via Artifactory] <[hidden email]> wrote:
We are running Artifactory Pro 4.5.1 rev 40117 on Ubuntu Trusty Tahr, and are having troubles with an NPM local repository.

For stability purposes, we don't allow our official builds to reach out to the internet, or even use a remote Artifactory repository; we must use Artifactory local repositories.  Any artifacts our build needs must be uploaded to these repositories.

We use the JSONLint NPM package.  This has a dependency on another package called JSV.  JSV, however, has a tiny problem.  Its package.json has "dependencies" set to "[]", and the standard appears to be a hash ("{}") rather than an array ("[]").

Artifactory has no problem pulling JSV into a remote repository from the internet.  However, if you try to upload a copy to a local repo, you get the following error:

Cannot deploy file JSV-4.0.2.tgz. Cause: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source: org.apache.commons.compress.archivers.tar.TarArchiveInputStream@485b0d83; line: 28, column: 3] (through reference chain: org.jfrog.repomd.npm.model.NpmMetadata["dependencies"])

Is there any way to get JSV-4.0.2 into a local Artifactory NPM repository?

Before anyone asks, a bug fix to JSV is unlikely: 4.0.2 is the latest and only release, published in 2012.



If you reply to this email, your message will be added to the discussion below:
http://forums.jfrog.org/Marginal-NPM-artifact-uploads-remotely-not-locally-tp7581098.html
To start a new topic under Artifactory - Users, email [hidden email]
To unsubscribe from Artifactory, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Marginal NPM artifact uploads remotely, not locally

rmandeville

I was hoping not to pull in somebody else’s project and have to build it ourselves (this alone can generate a half-kilo of documentation in our development environment), but I guess I’ll have to.

 

--Rob

 

From: shayb [via Artifactory] [mailto:ml-node+[hidden email]]
Sent: Friday, July 22, 2016 11:05 AM
To: Rob Mandeville
Subject: Re: Marginal NPM artifact uploads remotely, not locally

 

Hi,

 

From the npm documentation, it seems that the dependencies should always be wrapped with curly bracket {}. 

What about repacking the package and replace the [] with {}? if you have the sources, you can just modify the package.json file and rebuild it, if you only have the archive, you can repack it with modifying the internal package.json file (the one that inside the archive) and upload it to Artifactory using the Web-UI.

 

Shay

 

On Tue, Jul 12, 2016 at 2:04 PM, rmandeville [via Artifactory] <[hidden email]> wrote:

We are running Artifactory Pro 4.5.1 rev 40117 on Ubuntu Trusty Tahr, and are having troubles with an NPM local repository.

For stability purposes, we don't allow our official builds to reach out to the internet, or even use a remote Artifactory repository; we must use Artifactory local repositories.  Any artifacts our build needs must be uploaded to these repositories.

We use the JSONLint NPM package.  This has a dependency on another package called JSV.  JSV, however, has a tiny problem.  Its package.json has "dependencies" set to "[]", and the standard appears to be a hash ("{}") rather than an array ("[]").

Artifactory has no problem pulling JSV into a remote repository from the internet.  However, if you try to upload a copy to a local repo, you get the following error:

Cannot deploy file JSV-4.0.2.tgz. Cause: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source: [hidden email]; line: 28, column: 3] (through reference chain: org.jfrog.repomd.npm.model.NpmMetadata["dependencies"])


Is there any way to get JSV-4.0.2 into a local Artifactory NPM repository?

Before anyone asks, a bug fix to JSV is unlikely: 4.0.2 is the latest and only release, published in 2012.


If you reply to this email, your message will be added to the discussion below:

http://forums.jfrog.org/Marginal-NPM-artifact-uploads-remotely-not-locally-tp7581098.html

To start a new topic under Artifactory - Users, email [hidden email]
To unsubscribe from Artifactory, click here.
NAML

 

 


If you reply to this email, your message will be added to the discussion below:

http://forums.jfrog.org/Marginal-NPM-artifact-uploads-remotely-not-locally-tp7581098p7581113.html

To unsubscribe from Marginal NPM artifact uploads remotely, not locally, click here.
NAML

 

Click <a href="https://www.mailcontrol.com/sr/v2By8fHpIdDGX2PQPOmvUtVTDJsKpCsg6EkCD7aw1e7RSHvenj&#43;Icc7OH3LCmUnqAaYgz&#43;tX2v4FoPzuIXnePg=="> here to report this email as spam.

This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email.