ds300 / ds300/patch-package

patch failing to apply with packages with esbuild

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

Description

With a fresh `npm install patch-package`, if I try to modify either of these packages: `npm install snowpack`, `npm install vite` I get a similar error relating to a nested `node_modules/esbuild` and the patch does not generate. With Snowpack i'm modifying `assets/hmr.js` among other files

`npx patch-package snowpack`

```
patch-package 6.2.2
patch-package: you have both yarn.lock and package-lock.json
Defaulting to using npm
You can override this setting by passing --use-yarn or deleting
package-lock.json if you don't need it

• Creating temporary folder
• Installing snowpack@2.6.3 with npm
• Diffing your files with clean files
Error: ENOENT: no such file or directory, stat '/Users/brianjac/Projects/ngm-new-server-build/node_modules/snowpack/node_modules/esbuild/.install/node_modules/.bin/esbuild'
at Object.statSync (fs.js:856:3)
at Object.statSync (/Users/brianjac/Projects/ngm-new-server-build/node_modules/graceful-fs/polyfills.js:297:22)
at checkStats (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:171:22)
at checkPaths (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:183:31)
at copyDirItem (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:117:20)
at /Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:39
at Array.forEach ()
at copyDir (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:23)
at mkDirAndCopy (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:106:3)
at onDir (/Users/brianjac/Projects/ngm-new-server-build/node_modules/fs-extra/lib/copy-sync/copy-sync.js:97:37) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/Users/brianjac/Projects/ngm-new-server-build/node_modules/snowpack/node_modules/esbuild/.install/node_modules/.bin/esbuild'
}

```

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.