analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.48k stars 234 forks source link

Create project with analog@1.3.1 and cannot run npm i #1152

Closed AmbroseNTK closed 2 months ago

AmbroseNTK commented 2 months ago

Please provide the environment you discovered this bug in.

cannot create project

Which area/package is the issue in?

create-analog

Description

I would like to create Analog project for Angular 17 so I used Analog 1.3.1. But when I ran npm I, It was version conflict error. Please help me to create Analog with Angular 17

Please provide the exception or error you saw

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: lwp@0.0.0
npm error Found: @angular/compiler-cli@17.3.11
npm error node_modules/@angular/compiler-cli
npm error   dev @angular/compiler-cli@"^17.2.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/build-angular@18.0.3
npm error node_modules/@angular-devkit/build-angular
npm error   peer @angular-devkit/build-angular@"^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @analogjs/vite-plugin-angular@1.4.0
npm error   node_modules/@analogjs/vite-plugin-angular
npm error     dev @analogjs/vite-plugin-angular@"^1.3.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/ambrose/.npm/_logs/2024-06-11T17_03_40_367Z-eresolve-report.txt

Other information

No response

I would be willing to submit a PR to fix this issue

brandonroberts commented 2 months ago

You can use the v17 template

npm create analog@latest my-app -- --template angular-v17
cd my-app
npm i @angular-devkit/build-angular@17.3 @ngtools/webpack@17.3 --save-dev
ng serve