Network error from

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
Error: Network error from
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?

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.

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.

1 Like

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.

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