Search code examples
node.jsangularinstallationnpm-installangular7

Error for angular 7.2 Data path ".builders['application']" should be object


I have an angular project that I have to clone first from a git source before proceeding with working on it, I cloned it, the angular version was 7.2, My nodejs i updated to 20.15.1 LTS and angular is 18.1.0 globally, I changed both the global and local versions of angular to 7.2. I am still getting error mentioned in the title, I tried what was mentioned under some of the questions on stackoverflow as well, I deleted and cloned the project and ran npm install again but unfortunately the errors persist. I even check the angular json and formatted it as per articles and answer on stackoverflow itself but no luck enter image description here


Solution

  • Okay got it, seems quite simple once you use NVM. You can keep the angular version as 7.2, download and install nvm, the check the version by typing "nvm -v" in cmd, you may have to close terminal and reopen if it doesn't work right after installation. Navigate to your required folder, then use "nvm install (your version)" and after installation use "nvm use (node version)". Finally use npm install and then since the above is older version of node and angular you can use npm start.