Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3.0] patch-package error during installation "Patch file found for package prompts which is not present at node_modules/prompts" #241

Closed
andrew-pledge-io opened this issue Feb 5, 2025 · 3 comments

Comments

@andrew-pledge-io
Copy link

andrew-pledge-io commented Feb 5, 2025

When installing @figma/code-connect@1.3.0 I receive an error from patch-package:

npm error code 1
npm error path /myproject/node_modules/@figma/code-connect
npm error command failed
npm error command sh -c patch-package
npm error patch-package 8.0.0
npm error Applying patches...
npm error Error: Patch file found for package prompts which is not present at node_modules/@types/prompts
npm error Error: Patch file found for package prompts which is not present at node_modules/prompts
npm error ---
npm error patch-package finished with 2 error(s).

I can't provide a reproduction as it doesn't seem to happen in all environments.

For me it's happening inside a node:20 docker container running in GitLab CI. These are the reported versions:

$ node --version
v20.18.2
$ npm --version
10.8.2

Potential resolution

patch-package doesn't support running in published packages according to the maintainer: ds300/patch-package#84 (comment)

One suggestion is to move patch-package to prepare instead of postinstall:

One way to get around this would be to use prepare instead of postinstall to run patch-package, assuming your patches are only dev related (say patching certain @types/* for local dev).

@tomduncalf-figma
Copy link
Contributor

Hey @andrew-pledge-io, sorry for the trouble here. We're going to revert the change which required patching this package and will release an updated version soon!

@Jintus
Copy link

Jintus commented Feb 12, 2025

I have the same issue with my pipeline. I confirm that rollbacking to 1.2.4 solve the issue

@rrabherufigma
Copy link

Hi @andrew-pledge-io and @Jintus . The fix is now out in the latest release. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants