Skip to content

**ERROR** Failed to apply patch for package @smithy/middleware-endpoint #572

Open
@cmhakkim

Description

@cmhakkim

For me the patch-package fails only on GitHub Travis CI but works locally. Using v8.0.0, yarn 1.22.22, node 22.

It would be great if there were more verbose errors including the root cause. The error report below is somewhat useless.

The question is, why cannot patch-package apply the patch? What happened?

GitHub Travis CI

yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ patch-package
patch-package 8.0.0
Applying patches...
**ERROR** Failed to apply patch for package @smithy/middleware-endpoint at path
    node_modules/@smithy/middleware-endpoint
  This error was caused because patch-package cannot apply the following patch file:
    patches/@smithy+middleware-endpoint+4.1.11.patch
  Try removing node_modules and trying again. If that doesn't work, maybe there was
  an accidental change made to the patch file? Try recreating it by manually
  editing the appropriate files and running:
    patch-package @smithy/middleware-endpoint
  If that doesn't work, then it's a bug in patch-package, so please submit a bug
  report. Thanks!
    https://github.com/ds300/patch-package/issues
---
patch-package finished with 1 error(s).
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Local

yarn install
yarn install v1.22.22
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
$ patch-package
patch-package 8.0.0
Applying patches...
@smithy/middleware-endpoint@4.1.11 ✔
✨  Done in 0.56s.

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