shaunchander / astro-pwa-starter

✨ An opinionated Astro starter for building robust static websites.
astro-pwa-starter.vercel.app
205 stars 45 forks source link

Problem installing dependencies #9

Open DorKeinath opened 1 year ago

DorKeinath commented 1 year ago

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: astro-pwa-starter@1.0.0 npm ERR! Found: astro@2.0.6 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/tailwind@3.1.3 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.

shaunchander commented 1 year ago

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

asmolinski commented 10 months ago

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!

aleksa-codes commented 10 months ago

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.

jpasholk commented 4 months ago

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.