markteekman / accessible-astro-starter

An Accessible Starter Theme for Astro 4.0 including accessibility features such as landmarks, better focus-outline and skip-links navigation. Ships with Tailwind, Prettier and ESLint support.
https://accessible-astro.netlify.app/
MIT License
735 stars 136 forks source link

Dependency issue when deploying with Netlify after upgrade to Astro 3.0 #78

Closed markteekman closed 11 months ago

markteekman commented 11 months ago

With the latest updates in #76 there have been some issues with the deployment on Netlify:

7:30:20 PM: build-image version: 73f16e520fdddf409be6f578c8c2c8941bdf32d3 (focal)
7:30:20 PM: buildbot version: a11acbb405af91d225b392f15bc00822dbffb366
7:30:20 PM: Fetching cached dependencies
7:30:20 PM: Starting to download cache of 177.4MB
7:30:24 PM: Finished downloading cache in 3.8s
7:30:24 PM: Starting to extract cache
7:30:26 PM: Finished extracting cache in 2.414s
7:30:26 PM: Finished fetching cache in 6.264s
7:30:26 PM: Starting to prepare the repo for build
7:30:27 PM: Preparing Git Reference refs/heads/main
7:30:28 PM: Starting to install dependencies
7:30:28 PM: Python version set to 3.8
7:30:28 PM: Attempting Ruby version 2.7.2, read from environment
7:30:29 PM: Using Ruby version 2.7.2
7:30:29 PM: Started restoring cached go cache
7:30:29 PM: Finished restoring cached go cache
7:30:29 PM: go version go1.19.12 linux/amd64
7:30:30 PM: Using PHP version 8.0
7:30:31 PM: Started restoring cached Node.js version
7:30:31 PM: Finished restoring cached Node.js version
7:30:31 PM: Attempting Node.js version 'v20.5.1' from .nvmrc
7:30:32 PM: Downloading and installing node v20.5.1...
7:30:32 PM: Downloading https://nodejs.org/dist/v20.5.1/node-v20.5.1-linux-x64.tar.xz...
7:30:32 PM: Computing checksum with sha256sum
7:30:32 PM: Checksums matched!
7:30:34 PM: Now using node v20.5.1 (npm v9.8.0)
7:30:35 PM: Enabling Node.js Corepack
7:30:35 PM: Started restoring cached build plugins
7:30:35 PM: Finished restoring cached build plugins
7:30:35 PM: Started restoring cached corepack dependencies
7:30:35 PM: Finished restoring cached corepack dependencies
7:30:35 PM: No npm workspaces detected
7:30:35 PM: Started restoring cached node modules
7:30:35 PM: Finished restoring cached node modules
7:30:35 PM: Installing npm packages using npm version 9.8.0
7:30:38 PM: npm ERR! code ERESOLVE
7:30:38 PM: npm ERR! ERESOLVE could not resolve
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR! While resolving: accessible-astro-starter@3.0.0
7:30:38 PM: npm ERR! Found: @astrojs/mdx@0.19.7
7:30:38 PM: npm ERR! node_modules/@astrojs/mdx
7:30:38 PM: npm ERR!   dev @astrojs/mdx@^1.0.2 from the root project
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR! Could not resolve dependency:
7:30:38 PM: npm ERR! dev @astrojs/mdx@^1.0.2 from the root project
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR! Conflicting peer dependency: astro@3.0.12
7:30:38 PM: npm ERR! node_modules/astro
7:30:38 PM: npm ERR!   peer astro@^3.0.11 from @astrojs/mdx@1.0.3
7:30:38 PM: npm ERR!   node_modules/@astrojs/mdx
7:30:38 PM: npm ERR!     dev @astrojs/mdx@^1.0.2 from the root project
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR! Fix the upstream dependency conflict, or retry
7:30:38 PM: npm ERR! this command with --force or --legacy-peer-deps
7:30:38 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR!
7:30:38 PM: npm ERR! For a full report see:
7:30:38 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-09-09T17_30_35_533Z-eresolve-report.txt
7:30:38 PM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-09-09T17_30_35_533Z-debug-0.log
7:30:38 PM: Error during npm install
7:30:38 PM: Build was terminated: dependency_installation script returned non-zero exit code: 1
7:30:38 PM: Failing build: Failed to install dependencies
7:30:38 PM: Finished processing build request in 17.78s
david-abell commented 11 months ago

I wonder if its just a cache issue. I just went to test it on a clean install out of curiosity and deployment went fine. The only difference seems to be that nothing is cached for this new deploy build:

11:28:01 AM: build-image version: e70ad4c6ce38c2b84143366f988574c7090c7a66 (focal)
11:28:01 AM: buildbot version: 2bc8aa20325a7d9f0a817afc04cb3ec2786cb171
11:28:02 AM: Fetching cached dependencies
11:28:02 AM: Failed to fetch cache, continuing with build
11:28:02 AM: Starting to prepare the repo for build
11:28:02 AM: No cached dependencies found. Cloning fresh repo
...

Deploy logs here

Maybe one of the clear cache and deploy options instead of a regular deploy?

markteekman commented 11 months ago

@david-abell you are right! 😊 Ran another deploy with the option 'clear cache' and this time around, it worked! Noticed a small bug with the modal on Safari, so I'll address that in the components repo. Thanks again David!

david-abell commented 11 months ago

No problem, glad it was an easy fix!