signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.66k stars 2.67k forks source link

Can't build package ... **ERROR** Failed to apply patch for package socks-proxy-agent at path #7016

Closed chris-tux closed 2 months ago

chris-tux commented 2 months ago

Using a supported version?

Overall summary

When I try to create the package I get this error message.

----- 8< ----- ERROR Failed to apply patch for package socks-proxy-agent at path

node_modules/socks-proxy-agent

This error was caused because socks-proxy-agent has changed since you made the patch file for it. This introduced conflicts with your patch, just like a merge conflict in Git when separate incompatible changes are made to the same piece of code.

Maybe this means your patch file is no longer necessary, in which case hooray! Just delete it!

Otherwise, you need to generate a new patch file.

To generate a new one, just repeat the steps you made to generate the first one.

i.e. manually make the appropriate file changes, then run

patch-package socks-proxy-agent

Info: Patch file: patches/socks-proxy-agent+8.0.1.patch Patch was made for version: 8.0.1 Installed version: 8.0.4 ----- 8< -----

Steps to reproduce

  1. wget https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v7.24.1.tar.gz
  2. tar xfz v7.24.1.tar.gz
  3. cd Signal-Desktop-7.24.1
  4. yarn --c
  5. yarn install

Expected result

Normally the precess always ran through

Actual result

Warning: patch-package detected a patch file version mismatch

Don't worry! This is probably fine. The patch was still applied successfully. Here's the deets:

Patch file created for

@types/express@4.17.18

applied to

@types/express@4.17.21

At path

node_modules/@types/express

This warning is just to give you a heads-up. There is a small chance of breakage even though the patch was applied successfully. Make sure the package still behaves like you expect (you wrote tests, right?) and then run

patch-package @types/express

to update the version in the patch file name and make this warning go away.

ERROR Failed to apply patch for package socks-proxy-agent at path

node_modules/socks-proxy-agent

This error was caused because socks-proxy-agent has changed since you made the patch file for it. This introduced conflicts with your patch, just like a merge conflict in Git when separate incompatible changes are made to the same piece of code.

Maybe this means your patch file is no longer necessary, in which case hooray! Just delete it!

Otherwise, you need to generate a new patch file.

To generate a new one, just repeat the steps you made to generate the first one.

i.e. manually make the appropriate file changes, then run

patch-package socks-proxy-agent

Info: Patch file: patches/socks-proxy-agent+8.0.1.patch Patch was made for version: 8.0.1 Installed version: 8.0.4

Screenshots

No response

Signal version

7.22.0 and higher

Operating system

Fedora 40 - Kernel 6.10.6-200.fc40.x86_64

Version of Signal on your phone

No response

Link to debug log

No response

brjsp commented 2 months ago

Signal does not use yarn anymore, you need to use npm ci instead

chris-tux commented 2 months ago

Many thanks @brjsp for the information. With npm I can build cleanly again.

chris-tux commented 2 months ago

for me its done