I have angular4 project made by angular-cli on window. I would like to move this project to new ubuntu machine. I already installed angular-cli on new machine. should I move whole project file? If then, everything will work fine? any one have done this before?
- 1It should work.Ploppy– Ploppy2017-09-17 10:37:32 +00:00Commented Sep 17, 2017 at 10:37
- 2You wouldn't need to copy the node_modules folder. You can pretty much copy everything else to the new machine and run npm install. Everything should work as normalVarun Pozhath– Varun Pozhath2017-09-17 10:46:44 +00:00Commented Sep 17, 2017 at 10:46
- Try to use git or svn for code storing/versioning/sharing. This is very helpful. And then you just need to checkout/update your project in any machine/OS. And don't commit node_modules :)Anton Lee– Anton Lee2017-09-17 15:58:26 +00:00Commented Sep 17, 2017 at 15:58
Add a comment |
1 Answer
Ensure you have all relevant things installed on your new location (node, npm, angular/cli, etc. etc.).
Remove the node_modules folder (plus any other non-source folders you may or may not have like bower or whatnot) - unless you really want to copy an additional 30k+ files...
Copy/paste the entire (reduced) solution to your desired location.
Treat it like any other solution in any other location -> npm install -> ng serve.