Skip to content

Dependency Hell: Note to future self #6

@KB1RD

Description

@KB1RD

I've had to deal with my website suddenly not building before. The last time I encountered the issue, I spent like 6 hours working through it with no success, and finally just plopped my code into a template. This time, I decided to include exact versions in the package.json file. Fast forward to a few months ago, when I tried to upload a file and once again it didn't build. Looking at it now on my computer the issue is:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: kb1rd-net@undefined
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.2" from gatsby@2.29.2
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"2.29.2" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/kb1rd/.npm/_logs/2024-01-06T01_09_31_021Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kb1rd/.npm/_logs/2024-01-06T01_09_31_021Z-debug-0.log

Notice that package.json includes exact versions for each of these modules. The only logical conclusion is that these packages have actually been changed on NPM since I built this website last. Given the consistent issues that I've had with Gatsby-related dependency hell, I am going to switch to a different static site generator, I just don't have time now so I'll probably just find another Gatsby template and plop my code in.

Note to self to remind me of why, exactly, I need to switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions