Day 457: hell

of course i spent 13 hours today trying every way under the sun to deploy my next.js website on vercel as a monorepo but it kept not working so i devolved to monke where i make a change at random where i pray to linux that it magically works and ooh wee linus frowns upon me and how is it that these error messages pull up nothing of relevance on google ok i guess i should read these 10 different tutorials again that i found by googling every permutation of “monorepo vercel next.js lerna” but these are all medium articles behind a paywall and remember when medium was supposed to be the savior of publishing but now they just keep teasing me with their content and asking me to sign up and no thanks i’m just trying to get this monorepo deployed and lerna isn’t working and this random library that people seem to use for their next.js monorepo setup says lerna isn’t the right tool for setting up dependencies on local libraries so i guess i’ll try npm paths with file: but that’s not working either oh wait there’s a new feature in npm 7 called workspaces so maybe that will help so i will try to upgrade npm but there’s this dependency that breaks when i upgrade from node 14 to node 15 so i guess can’t do that but maybe it’s worth no longer using the remotedev library which helps me debug redux things so i can remove the dependency but hey wait slow down maybe i can get npm 7 without upgrading node and oh wow it worked but this npm workspaces thing didn’t fix the deployment issue and how is this different from lerna and all i wanted is to have all of my code under a single repo so i could share types and this is turning out to be worse than having my computer explode in my face and give me covid at the same time and i regret everything sigh i guess i’ll try switching over from npm to yarn so i could use yarn workspaces since npm workspaces only came out a few months ago and it’s not listed as one of the monorepo tools that vercel lists on its documentation site and oh my sweet baby jesus someone made an example repo that demonstrates how to set up a monorepo with next.js and it looks like i need to resolve the imports in tsconfig and then use webpack to transpile the imported code and i think it’s working now but i’m too tired to be able to think about this clearly oh look it’s 4am again i’m going to go cry myself to sleep kthxbai