npm run dev command keeps failing - need help troubleshooting

I’ve been working on some mobile projects and switched from one platform to try Bolt.new. Now I’m stuck with constant npm errors that are driving me crazy.

Every time I run npm run dev it crashes with errors. The npm install process is super slow too, taking around 15 minutes before it fails on the first attempt. Even my globally installed Expo CLI isn’t being recognized by the terminal.

This is really frustrating because I never had these issues before. I can’t get any preview to show up because of these build problems.

Has anyone else dealt with similar npm development server issues? What steps did you take to resolve them?

I ran into something very similar after switching development environments last year. In my case, the problem was actually a Node.js version conflict between what Bolt.new expected and what I had installed locally. First thing I’d check is your Node version with node --version. Most modern frameworks need Node 16 or higher, and having an outdated version causes exactly the kind of slow installs and crashes you’re describing. For the Expo CLI recognition issue, you might need to reinstall it globally after fixing your Node setup. I had to run npm uninstall -g @expo/cli followed by npm install -g @expo/cli to get it working again. Also worth checking if you have any conflicting package managers installed. Having both npm and yarn can sometimes cause weird dependency resolution problems that lead to those 15-minute failed installs.

hey, i had a similar issue once! try clearing the npm cache too. run npm cache clean --force then delete node_modules and package-lock.json. after that, do a fresh npm install. sometimes those pesky cache files mess things up!