Open
Description
Does patch-package
support turborepo / monorepo using npm?
My repo has a similar structure to: https://github.com/vercel/turborepo/blob/main/examples/basic/README.md
Namely, each app
/ package
(workspace) has a package.json
but no package-lock.json
, which gives me an error when trying to patch.
Steps to Repo
- navigate to workspace
cd apps/myApp
- install
patch-package
npm i patch-package --save-dev
- fix a bug in one of your dependencies
vim node_modules/some-package/brokenFile.js
- run patch-package to create a .patch file
npx patch-package some-package
Creating temporary folder
Error: Can't find yarn.lock file
It is throwing this error because it cannot find the package-lock.json
in the workspace directory, so it assumes yarn.
patch-package/src/detectPackageManager.ts
Lines 44 to 45 in bd2e9a4
Patch Package in root
The package/file I want to patch is located in the node_modules
of the app
/ package
(workspace).
apps/myApp/nod_modules/some-package
Is it possible to target that via npx patch-package some-package
when running in the root directory?
Metadata
Metadata
Assignees
Labels
No labels