angular: first-app-lesson-01 does not install
Which @angular/* package(s) are the source of the bug?
Don’t known / other
Is this a regression?
Yes
Description
I started to look at angular, trying the first tutorial.
Installed node-v20.10.0-x64.msi on windows. Run in cygwin bash. “npm -v” returns “10.2.4”.
Step 1 , running “npm install” fails.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
> npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular.io-example@0.0.0
npm ERR! Found: @angular/common@17.0.0
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"17.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^16.0.0" from angular-in-memory-web-api@0.16.0
npm ERR! node_modules/angular-in-memory-web-api
npm ERR! angular-in-memory-web-api@"~0.16.0" 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\jeremy\AppData\Local\npm-cache\_logs\2023-11-30T15_58_47_296Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\jeremy\AppData\Local\npm-cache\_logs\2023-11-30T15_58_47_296Z-debug-0.log
Please provide the environment you discovered this bug in (run ng version
)
No response
Anything else?
No response
About this issue
- Original URL
- State: open
- Created 7 months ago
- Reactions: 8
- Comments: 19 (5 by maintainers)
Same issue on macOS 12.5.1:
Fresh install of angular:
I’m trying Lesson 1: Hello world. First, the downloaded folder is named:
first-app-lesson-00
Yet, the tutorial says:
In your project directory, navigate to the
first-app
directory.I looked inside the
first-app-lesson-00
directory, and there is nofirst-app
directory. After going into the directory:first-app-lesson-00
and running
npm install
, this is what I see:Option 1 results:
Option 2 results (after deleting first-app-lesson-00 folder and unzipping download again):
After seeing the last result again, I opened up a new Terminal window, then I cd’ed into the first-app-lesson-00 directory:
That indicates that the app is up and running.
As far as I can tell, angular is unable to resolve all the dependencies it needs, and angular employs several deprecated packages. If the angular team can’t produce a hello world app that works without error, then angular is way too complex. I’m posting this in the hopes that the angular team will be able to help the next poor sap who is interested in seeing what angular is all about. I’m off to try Svelte. Good luck all.
Hey @jeremy-ekers, I tried reproducing above issue you mentioned.
npm install
faced same issueYou can go with 2 possible approaches (both worked for me)-
Option 1 :
npm install angular-in-memory-web-api@latest
,npn install
ng serve
: app is successfully deployed.Option 2 :
npm install --force
, it will install all required dependecies forcefully.ng serve
: app is successfully deployed.I hope it works for you.
in package.json I changed
to
reran
npm i
How do we get some attention on this? It is absurd that the very first beginner example Angular is putting forward is non-functional out of the box.
npm i --force
These changes will go out in the next minor release but I understand that this is frustrating. As an alternative for now the first-app-lesson-01 can be run if you try one of the options listed above or you can also do this lesson in the browser on angular.dev:
https://angular.dev/tutorials/first-app
Thank you for your patience on this one.
Changes haven’t been deployed yet, there is work pending on our side for this.
Quick update - we have a PR open to address the infra-changes that should fix this issue.
Stay tuned.