ds300 / ds300/patch-package

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

Open
#572 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

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.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.