I recently completed the Angular Tour of Heroes tutorial (with some slight modifications) and it all works fantastically well. I then wanted to try push it up to a GIT repo in VSTS, and then clone it to another machine and run it from there. Unfortunately now I've cloned it to the new machine I'm unable to get it running. Both ng serve --open and ng build fail.
Originally it was complaining about missing "@angular-devkit/build-angular" so I went ahead and installed that, unfortunately on the next build attempt there was another issue
"Cannot find module '@angular-devkit/build-optimizer'"
Is it going to be the case that I need to reinstall every dependency every time I clone a solution using Angular or Node, or is there a simple command I'm missing here?
Google suggested I try "npm install -g npm-install-missing" and "npm rebuild", unfortunately neither helped.
After cloning the project just follow the instructions.
cd 'your project name...'
And then install the packages and dependencies.
npm install
and then you can run the project by running this code.
ng serve
This should work fine.
You need to npm install
before serving
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With