ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.26k stars 287 forks source link

Packages with a leading @ are not found #435

Open NeoPCl opened 1 year ago

NeoPCl commented 1 year ago

I changed something in the package @sentry. Then tried running npx patch-package @sentry to add to my permanent fixes. That throws this error:

No such package @sentry File not found: /home/me/Development/some-app/node_modules/package.json

I used patch-package 6.5.0

Basil-Code commented 1 year ago

I think you must specify a package that does contain package.json in order for this to work for example, @sentry/react instead of @sentry.

NeoPCl commented 1 year ago

Yes, you are right. That worked.

nikita-fuchs commented 1 year ago

It doesn't work. If you try

npx patch-package @strapi/plugin-users-permissions

the directories will be screwed up:

` Error: Cannot find module '...myproject/node_modules/@strapi/node_modules/@strapi/plugin-users-permissions/package.json'

I wish this could be fixed 😕

jacquesdev commented 11 months ago

@nikita-fuchs - I assume this is now fixed? I didn't have that issue

nikita-fuchs commented 10 months ago

thanks, feel free to close for now, if I stumble upon this issue again I'll open a new issue, I can't try to reproduce right now.