Forum Discussion
Witold_Kups
Aug 29, 2023Copper Contributor
"The package.json file is too large. Size limit is 384000 bytes" when trying to push npm package to
Duplicate from https://learn.microsoft.com/en-us/answers/questions/1350857/the-package-json-file-is-too-large-size-limit-is-3 site, but I got no help there and also was redirected on https://twitter....
Kidd_Ip
Aug 19, 2025MVP
Take this:
Trim package.json
- Move large config blocks (e.g. scripts, metadata, custom fields) into separate .json files.
- Use require() or import them in your code instead of embedding them in package.json.
Split Large Files
- Refactor large modules into smaller ones.
- Consider lazy-loading or dynamic imports if applicable.
Use Universal Packages
Azure Artifacts supports Universal Packages, which allow:
- Up to 4TB per file
- Ideal for binaries, large assets, or even bundled npm-like content
You won’t get native npm install support, but you can script downloads and unpacking.