Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenkins. Jenkins job is configured to do the following (relevant steps only): fetch source...
#2: Post edited
Is it necessary for a build server to remove node_modules before an AOT build?
I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenskins.- Jenkins job is configured to do the following (relevant steps only):
- - fetch sources from Git
- - remove node_modules
- npm install- perform AOT build (--prod + other optimizations)- - deploy
I have noticed that node_modules removal + npm install + AOT build takes way more time than simply calling npm install + perform AOT build, so I am wondering why the removal.- I have asked a few colleagues about this configuration and no one seems to know why the removal is required.
- From what I know, removing node_modules is very rarely required (maybe some major update messes up some packages or similar) and I haven't removed any node_modules for any project in years (development environment).
- So, is it necessary for a build server to remove node_modules before an AOT build?
- I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenkins.
- Jenkins job is configured to do the following (relevant steps only):
- - fetch sources from Git
- - remove node_modules
- - `npm install`
- - perform AOT build (`--prod` + other optimizations)
- - deploy
- I have noticed that node_modules removal + `npm install` + AOT build takes way more time than simply calling `npm install` + perform AOT build, so I am wondering why the removal.
- I have asked a few colleagues about this configuration and no one seems to know why the removal is required.
- From what I know, removing node_modules is very rarely required (maybe some major update messes up some packages or similar) and I haven't removed any node_modules for any project in years (development environment).
- So, is it necessary for a build server to remove node_modules before an AOT build?
#1: Initial revision
Is it necessary for a build server to remove node_modules before an AOT build?
I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenskins. Jenkins job is configured to do the following (relevant steps only): - fetch sources from Git - remove node_modules - npm install - perform AOT build (--prod + other optimizations) - deploy I have noticed that node_modules removal + npm install + AOT build takes way more time than simply calling npm install + perform AOT build, so I am wondering why the removal. I have asked a few colleagues about this configuration and no one seems to know why the removal is required. From what I know, removing node_modules is very rarely required (maybe some major update messes up some packages or similar) and I haven't removed any node_modules for any project in years (development environment). So, is it necessary for a build server to remove node_modules before an AOT build?