Hi all, I'm new to node.js and decided to learn angular by following the guide available here
I've tried searching for solutions myself without success and would appreciate if you would be patient with me since I am still new to this environment
I successfully installed node :
> node -v
v20.12.1
and installed angular
> npm install -g @angular/cli
changed 233 packages in 12s
44 packages are looking for funding
run `npm fund` for details
However trying to install the dependencies for first-app causes a bunch of errors:
> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular-devkit/build-angular@17.3.3
npm ERR! Found: protractor@3.3.0
npm ERR! node_modules/protractor
npm ERR! dev protractor@"^3.3.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional protractor@"^7.0.0" from @angular-devkit/build-angular@17.3.3
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"^17.3.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: protractor@7.0.0
npm ERR! node_modules/protractor
npm ERR! peerOptional protractor@"^7.0.0" from @angular-devkit/build-angular@17.3.3
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"^17.3.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\<REDACTED_USERNAME>\AppData\Local\npm-cache\_logs\2024-04-05T14_11_17_258Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\<REDACTED_USERNAME>\AppData\Local\npm-cache\_logs\2024-04-05T14_11_17_258Z-debug-0.log
I'm not too sure on how to resolve these dependency conflicts and attempting to npm install --force causes more warnings to pop up.
This is the package.json included with first-app
{
"name": "angular.io-example",
"version": "0.0.0",
"description": "Example project from an angular.io guide.",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "17.2.4",
"@angular/common": "17.2.4",
"@angular/compiler": "17.2.4",
"@angular/core": "17.2.4",
"@angular/forms": "17.2.4",
"@angular/platform-browser": "17.2.4",
"@angular/platform-browser-dynamic": "17.2.4",
"@angular/router": "17.2.4",
"angular-in-memory-web-api": "~0.17.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.3",
"@angular/cli": "17.2.3",
"@angular/compiler-cli": "17.2.4",
"@types/jasmine": "~5.1.0",
"@types/node": "^16.11.35",
"copyfiles": "^2.4.1",
"jasmine-core": "~5.1.0",
"jasmine-marbles": "~0.9.2",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "^3.3.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
}
}