Skip to content

[Question] patch on published module #198

Closed
@gigaga

Description

@gigaga

Hello,

currently I have a module project (named great-module) where the code is organized like that:

/node_modules/sub-module
/patches
package.json

From this repo, the postinstall script is correctly executed and the patch is applied to sub-module module.

After publishing my module (npm publish) I want to use it from another project (npm install geat-module).
But after install process, I have the following error message : Error: Patch file found for package sub-module which is not present at node_modules/sub-module

Indeed, after this installation, the code of this project is organized like that:

/node_modules/great-module/patches
/node_modules/sub-module
package.json

patch-package tries to use sub-module from /node_modules/great-module/node_modules/sub-module and not from /node_modules/sub-module.

What is the way to apply patches in published module?

Thanks a lot :)

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