Yarn (and npm) Install Taking Excessively Long on First Run; Issues with Other Commands as Well
Hello community,
I hope you're all doing well. I'm currently facing multiple issues with my development environment on a new MacBook Air with an M2 chip. I'm seeking some guidance to understand and resolve these problems.
Issue 1: Yarn Install Duration Problem:
I've noticed that when I run yarn install in my project for the first time, it's taking an unusually long time, exceeding 30 minutes. I understand that the first run may be slower due to downloading and caching dependencies, but this duration seems excessive.
Observations:
- The project has a reasonable number of dependencies, but nothing extraordinary.
- I've checked my internet connection, and it seems stable with decent download speeds for other files.
- I've cleared the Yarn cache and retried the installation, but the issue persists.
- Disk space is not an issue, and there are no error messages during the installation.
Environment:
- MacBook Air with M2 chip
- macOS: latest
- Node.js version: latest
- Yarn version: latest
- NPM version: latest
Steps Taken:
- Checked internet connection.
- Cleared Yarn cache.
- Verified disk space.
- Checked for error messages during installation.
Additional Information: I've also tried running the same installation on a different network to rule out connectivity issues.
Issue 2: rm -rf node_modules Slow and Unresponsive:
In addition to the Yarn install problem, I've noticed that even running a simple command like rm -rf node_modules in my project root is extremely slow and may not even be working. This issue seems unrelated to Yarn.
Observations:
- Memory usage is within normal limits.
- The MacBook Air is brand new.
Steps Taken:
- Checked memory usage.
- Ensured sufficient disk space.
- Verified that there are no other resource-intensive processes running.
I would appreciate any insights, suggestions, or guidance from the community on what might be causing both the prolonged installation time with Yarn and the slowness with the rm command. Additionally, any tips on how to troubleshoot and resolve these issues would be highly valuable.
Thank you in advance for your assistance!
MacBook Air 15″, macOS 14.0