Skip Navigation

[Mastodon] Getting stuck on trying to apply the latest update

SOLUTION HERE (by @just_another_person@lemmy.world): https://lemmy.abnormalbeings.space/post/804932?scrollToComments=true

You have a dependency discrepancy with your local node modules and your global. You should be running this in a node virtual environment so all of the local projects dependencies don’t conflict with global.

https://stackoverflow.com/questions/3653495/is-there-a-virtual-environment-for-node-js

https://www.develves.net/blogs/asd/2016-04-28-using-virtual-environments-nodejs/

cross-posted from: https://lemmy.abnormalbeings.space/post/804932

I have searched around for answers to this, but so far, the solutions I found and tried have not been working for me. Thankfully, the update isn't that critical, so time is not of the essence as of now. But I fear, the problem will only persist.

So, bit of a headscratcher: I am following the guide to upgrade (no Docker) from here.

Simple enough, right? Sadly, I keep getting:

 
    
~/live$ RAILS_ENV=production bundle exec rails assets:precompile
I, [2025-04-03T20:30:30.072648 #981372]  INFO -- : [dotenv] Loaded .env.production
Mastodon and Webpacker requires Yarn ">=4 <5" and you are using 1.22.22
Exiting!

  

So, the proposed solution? Using corepack as intended. That, at first, upon entering "corpack prepare" and "corepack enable" in succession, seemed to run silently and without errors/warnings.

But it changed nothing at all for the error message. Prompting me to search around, haphazardly try to apply fixes, trying to remove and reinstall yarn, "the usual". My last attempt was to globally remove yarn and corepack with npm and then re-install both. Since then, a new, exciting error is happening:

 
    
~/live$ corepack enable
Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -'/usr/bin/pnpm'
    at async Object.symlink (node:internal/fs/promises:1005:10)
    at async EnableCommand.generatePosixLink (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:23156:5)
    at async Promise.all (index 0)
    at async EnableCommand.execute (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:23143:5)
    at async EnableCommand.validateAndExecute (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:20258:22)
    at async _Cli.run (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:21195:18)
    at async Object.runMain (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:23642:19)

  

Oh, and when trying to install yarn and corepack, now, I get:

 
    
~/live$ npm install yarn
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "patch:": patch:babel-plugin-lodash@npm%3A3.3.4#~/.yarn/patches/babel-plugin-lodash-npm-3.3.4-c7161075b6.patch
npm error A complete log of this run can be found in: /home/mastodon/.npm/_logs/2025-04-03T19_54_12_827Z-debug-0.log

~/live$ npm install corepack
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "patch:": patch:babel-plugin-lodash@npm%3A3.3.4#~/.yarn/patches/babel-plugin-lodash-npm-3.3.4-c7161075b6.patch
npm error A complete log of this run can be found in: /home/mastodon/.npm/_logs/2025-04-03T19_54_25_678Z-debug-0.log

  

Thankfully, mastodon is still working, no database issues, nothing indicating I fucked up beyond repair yet.

I am a bit at a loss, unfortunately, but eager to use my fuckup as a learning experience - am glad to hear any and all more experienced folk chiming in!___

0 comments

No comments