Currently, I am in the process of following an Angular tutorial and I wanted to run a project created by the instructor. To achieve this, I referred to the steps outlined in the 'how-to-use' file:
How to use
Begin by running "npm install" within the project folder to install all necessary dependencies.
Ensure that you are using the latest version of CLI (refer to the upgrade guide below).
To view the application in action, execute "ng serve" (try "npm start" if "ng serve" encounters any issues).
You are welcome to compare it with your own project code to identify any potential errors.
Upgrade Guide for CLI
Execute the commands provided below - utilize "sudo" only on Mac/Linux systems.
sudo npm uninstall -g angular-cli @angular/cli npm cache clean --force sudo npm install -g @angular/cli
The process of upgrading the CLI went smoothly; however, when attempting to execute the "npm install" command, I encountered the following errors:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f4998dd9929d868780d9958484b4c4dac4dac4">[email protected]</a>
(... error log continues ...)
Furthermore, here is my package.json:
{
"name": "my-first-app",
"version": "0.0.0",
(... package details included ...)
}
and my Angular.json file:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
(... Angular configuration details included ...)
}