I Like
I Like

Reputation: 1847

angular cli processes take too long

I'm following the Angular heroes tutorial and am currently stuck on the Services portion. Yesterday, I was able to create components, but now angular cli refuses to do anything besides serve my website locally. When I try running ng generate service hero or ng generate component hero on my Mac osx terminal, the process just stalls and never indicates whether it has completed.

I checked the list of processes in a separate terminal window, and noticed that node command remains in a 'sleeping' state when I try these angular-cli commands. Restarting my computer hasn't helped. My npm and node.js are the latest versions. I would like to know what the problem might be and whether I should reinstall nodejs.

Upvotes: 1

Views: 785

Answers (1)

lotyrin
lotyrin

Reputation: 192

I'd speculatively go ahead and reinstall all the related software (node, npm, and the modules in your project) as that should be fairly safe and easy to try.

After that, if the problem persists, I'd try using dtruss to watch what the process and its children are doing, and see what they do directly before hanging (maybe making a network call or filesystem call that's slow) in order to guess at what to try next to resolve the issue.

Upvotes: 1

Related Questions