Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: npm error when downloading code example from stackblitz #3451

Open
bb-face opened this issue Feb 14, 2024 · 0 comments
Open

bug: npm error when downloading code example from stackblitz #3451

bb-face opened this issue Feb 14, 2024 · 0 comments
Labels
triage New issues

Comments

@bb-face
Copy link

bb-face commented Feb 14, 2024

Describe the Bug

In the documentation, in the code examples, there's a button to open a specific example in codeblitz. From there you can download the project and try it locally. When I do that (like the example of the moda: https://stackblitz.com/edit/angular-blqtjv?file=src%2Fapp%2Fapp.component.ts) and try to install it, I get the following error when running npm i:

❯ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @angular/compiler-cli@11.0.9
npm ERR! Found: @angular/compiler@17.0.1
npm ERR! node_modules/@angular/compiler
npm ERR!   @angular/compiler@"17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"11.0.9" from @angular/compiler-cli@11.0.9
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"~11.0.4" from the root project
npm ERR!   peer @angular/compiler-cli@"^11.0.0" from @angular-devkit/build-angular@0.1100.7
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"~0.1100.4" from the root project
npm ERR!   1 more (@ngtools/webpack)
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/compiler@11.0.9
npm ERR! node_modules/@angular/compiler
npm ERR!   peer @angular/compiler@"11.0.9" from @angular/compiler-cli@11.0.9
npm ERR!   node_modules/@angular/compiler-cli
npm ERR!     dev @angular/compiler-cli@"~11.0.4" from the root project
npm ERR!     peer @angular/compiler-cli@"^11.0.0" from @angular-devkit/build-angular@0.1100.7
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"~0.1100.4" from the root project
npm ERR!     1 more (@ngtools/webpack)
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:

I'm using node version v20.10.0 and npm version 10.2.3

Expected Behavior

The expected bheaviour woudl be to be able to run npm i and set up the project locally.

Steps to Reproduce

  1. find a code example in the documentation;
  2. open the code in stackblitz;
  3. download the project;
  4. try to install it with npm i;

Screenshots

No response

Operating System

mac os

Browser

No response

Version

No response

Additional Information

No response

@bb-face bb-face added the triage New issues label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issues
Projects
None yet
Development

No branches or pull requests

1 participant