When executing YARN, an error is reported: Failed to apply patch for package laravel-mix. patches\Laravel-mix+6.0.43.patch could not be parsed.
1. When executing yarn, an error is reported: Failed to apply patch for package laravel-mix. patches\Laravel-mix+6.0.43.patch could not be parsed. as shown in Figure 1
PS E:\wwwroot\object> yarn YARN Install v1.22.15 [1/5]Validating package.json... [2/5]resolving packages... success already up-to-date. $patch-package patch-package 6.4.7 Applying patches... concat@1.0.3 ✔ eslint-plugin-jsonc@2.3.0 ✔ **Error** Failed to apply patch for package Laravel-mix This caught because the patch file patches\Laravel-mix+6.0.43.patch could not be parsed. If you just upgraded patch-package, you can try running: cd patches\Laravel-mix+6.0.43.patc patch-p1-i h NPX Patch-Package Laravel-Mix cd ../.. Otherwise, try manually creating the patch file again. If the problem persists, please submit a bug report: https://github.com/ds300/patch-package/issues/new?title=patch+file+ parse+error&body=%3cplease+attach+the+patch+file+in+question%3e Error command failed with exit code 1. Info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2. Check the git log, the previous version of patches\Laravel-mix+6.0.43.patch is: patches\laravel-mix+6.0.48.patch. as shown in Figure 2
3. After deleting the directory: node_modules, execute again: yarn, and still report the same error. as shown in Figure 3
4. Reference prompt, execute: NPX patch-package laravel-mix. as shown in Figure 4
PS E:\wwwroot\object> npx patch-package laravel-mix patch-package 6.4.7 • Creating temporary folder • Installing laravel-mix@6.0.43 with yarn • Diffing your files with clean files ⁉️ Not Creating Patch File for PackageLaravel-mix ⁉️ There DonTappear to be any changes. npm notice NPM Notice New Minor Version of NPM Available! 8.1.2 -> 8.12.1 npm notice changelog: https://github.com/npm/cli/releases/tag/v8.12.1 npm notice run npm install -g npm@8.12.1 to update! npm notice
5. Execute again: yarn, still report an error. Reference: https://github.com/ds300/patch-package/issues/191 . Replace newlines from CRLF with LF. No more errors. as shown in Figure 5




