astro-pwa-starter icon indicating copy to clipboard operation
astro-pwa-starter copied to clipboard

Problem installing dependencies

Open DorKeinath opened this issue 1 year ago • 4 comments

Hello! I'm to stupid to install the dependencies. How do I do it? With npm install I get

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/astro npm ERR! dev astro@"2.0.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer astro@"^2.5.0" from @astrojs/[email protected] npm ERR! node_modules/@astrojs/tailwind npm ERR! dev @astrojs/tailwind@"^3.0.1" 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.

DorKeinath avatar Aug 03 '23 20:08 DorKeinath

Will need to look into this! Sorry for the late reply on this.

shaunchander avatar Aug 18 '23 04:08 shaunchander

Hello!

It looks like you're running into a common dependency conflict issue. The template you're using is built on an older version of Astro (2.10), and there's a mismatch with the newer dependencies, particularly @astrojs/tailwind.

I had similar issues when working with this templates. Initially, I used the --force flag with npm install, but that's not always the best solution as it can lead to potential problems down the line.

What worked for me was upgrading Astro to the latest version. Given that you're working with an older template, you might want to consider migrating to Astro v3. They have a comprehensive upgrade guide which should help you make the transition smoothly.

I hope that helps!

asmolinski avatar Oct 18 '23 14:10 asmolinski

Hello everyone!

looks like tailwindcss is missing as a dependency, like mentioned here: astro/tailwind - manual install. Also as @asmolinski said I upgraded all dependencies and then add tailwindcss, after that it worked.

aleksa-codes avatar Oct 26 '23 22:10 aleksa-codes

I'm having a similar issue, but only with the build on Netlify.

I'll post my error message later when I get home.

It's odd, because I'm able to build everything locally though.

jpasholk avatar Apr 12 '24 19:04 jpasholk