# Network error from https://api.particle.io/v1/libraries

**URL:** <https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751>\
**Category:** Libraries\
**Created:** [December 27, 2022, 11:21pm UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751 "2022-12-27T23:21:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronlisle](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ronlisle/32/8336_2.png) [@ronlisle](https://community.particle.io/u/ronlisle)\
**Post date:** [December 27, 2022, 11:21pm UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751/1 "2022-12-27T23:21:59Z")

</div>

I recently updated Node to LTS 19.3.0 on my M1 Mac (along with nvm, etc) and now particle CLI won’t upload libraries (I’ve tried several).

particle library upload -v  
Validating library at /Users/ronlisle/GitRepos/Patriot/Photon/IoTlib/  
Uploading library IoT  
Network error from [https://api.particle.io/v1/libraries](https://api.particle.io/v1/libraries)  
Error: Network error from [https://api.particle.io/v1/libraries](https://api.particle.io/v1/libraries)  
at /Users/ron/.nvm/versions/node/v18.12.1/lib/node\_modules/particle-cli/node\_modules/particle-api-js/lib/Agent.js:246:19  
at Request.callback (/Users/ron/.nvm/versions/node/v18.12.1/lib/node\_modules/particle-cli/node\_modules/superagent/lib/node/index.js:893:3)  
at ClientRequest. (/Users/ron/.nvm/versions/node/v18.12.1/lib/node\_modules/particle-cli/node\_modules/superagent/lib/node/index.js:810:12)  
at ClientRequest.emit (node:events:525:35)  
at TLSSocket.socketOnEnd (node:\_http\_client:518:9)  
at TLSSocket.emit (node:events:525:35)  
at endReadableNT (node:internal/streams/readable:1359:12)  
at process.processTicksAndRejections (node:internal/process/task\_queues:82:21)

I’ve tried switching node back to v18.12.1 but no change. This is on Ventura 13.1 M1 MBP. I’ve tried updating particle-cli, signout out/in, rebooting, but no joy. Suggestions?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [December 28, 2022, 10:32am UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751/2 "2022-12-28T10:32:05Z")

</div>

The most common reason for that is that your library is too large. Make sure you don’t have subdirectories that contain files that are not used during the Particle build. Large test data files could also cause issues. Source code for other platforms can also increase the size.

---

<div class="post-metadata">

**Author:** ![ronlisle](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ronlisle/32/8336_2.png) [@ronlisle](https://community.particle.io/u/ronlisle)\
**Post date:** [December 28, 2022, 11:24am UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751/3 "2022-12-28T11:24:48Z")

</div>

Thank you for the suggestion.  
The directory was 67,004 bytes large. I tried decreasing it by removing some example code, reducing it to 49,676 bytes and still the error occurs.  
My other smaller libraries also get the error, one of which is only 9k large.  
These libraries were uploading successfully previously, so I’m pretty sure the problem was caused by something I’ve done to my system (eg. upgrading node or some other libraries) and not something related to the library source code.

---

<div class="post-metadata">

**Author:** ![ronlisle](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ronlisle/32/8336_2.png) [@ronlisle](https://community.particle.io/u/ronlisle)\
**Post date:** [December 29, 2022, 1:36pm UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751/4 "2022-12-29T13:36:32Z")

</div>

I’m not sure what’s changed, but library upload is working this morning. The only changes I can recall making since the last failed attempt is another reboot, some changes to HomeKit. I’m glad it’s working, but I really hate not understanding what happened to make it start working.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [February 27, 2023, 1:36pm UTC](https://community.particle.io/t/network-error-from-https-api-particle-io-v1-libraries/63751/5 "2023-02-27T13:36:38Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
