"The package.json file is too large. Size limit is 384000 bytes" when trying to push npm package to azure artifacts

Witold Kupś 10 Reputation points
2023-08-23T05:36:31.5133333+00:00

Hello, we are migrating to azure artifacts from our local hosted nexus.
We have one npm lib, which has quite big package json, and also a couple of bigger files (>1MB).
Is it somehow possible to push that to azure, and then use as a normal npm package in our projects?
if not - why is there such a limitation? I could not find anywhere anything regarding package.json/single file limitation, the only I found was for the whole package (tgz has 8.4 MB).

Not to mention this https://learn.microsoft.com/en-us/azure/devops/artifacts/reference/limits?view=azure-devops#size-limits

Npm packages: limited to 500 MB per file.
whereas I have also error after cutting package.json that some file has size higher than 1MB

Community Center | Not monitored
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Erkan Sahin 840 Reputation points
    2023-08-23T08:34:17.3+00:00

    Azure Artifacts has a size limit of 500 MB per npm package file. If your package exceeds this, consider the following:

    Optimize Your Package
    Reduce the size by removing unnecessary files or splitting it into smaller packages.

    Use Universal Packages
    For large binary files, Azure supports Universal Packages up to 4 TB.

    Set Retention Policies
    Automatically delete older package versions to manage storage.

    In essence, review your npm package to fit Azure's size limits, and consider using Azure's features like Universal Packages and retention policies to manage large files and storage efficiently.


  2. Sumarigo-MSFT 47,466 Reputation points Microsoft Employee Moderator
    2023-08-30T04:53:05.19+00:00

    @Witold Kupś Thank you for the question. You have posted the query on Azure Storage Service forums, for a specialized assistance on DevOps query, kindly just re-post the question on Developer Community to receive a focused and immediate assistance from the right set of experts.  It would the better medium to get better help since the issue doesn't seem to be storage

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  3. Lilei Song 0 Reputation points
    2024-07-31T08:55:16.6766667+00:00

    Hi, how is the result? I encounter the same issue, and the total file is 4.4 MB, but the Azure throw the error:httpStatusCode: 400, ErrorCode: EntityTooLarge, ErrorMessage: 0:The entity is larger than the maximum allowed size (1MB).

    What should I do?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.