Skip to content

2.0.1 throwing error on install #142

New issue

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

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

Already on GitHub? # to your account

Closed
sachaw opened this issue Aug 15, 2021 · 3 comments
Closed

2.0.1 throwing error on install #142

sachaw opened this issue Aug 15, 2021 · 3 comments

Comments

@sachaw
Copy link

sachaw commented Aug 15, 2021

Using TS 4.3.5, upgrading from 2.0.0 to 2.0.1 throws:

An unexpected error occurred: "could not find a copy of typescript to link in ~/node_modules/@protobuf-ts/plugin/node_modules".
@timostamm
Copy link
Owner

This is a bug in yarn 1.x, see yarnpkg/yarn#6285 (comment).

The following works without error in yarn 1.22.10:

yarn init -y && yarn add typescript@4.3.5 && yarn add @protobuf-ts/plugin

Did you find a workaround?

@sachaw
Copy link
Author

sachaw commented Aug 15, 2021

No workaround ATM, I may be switching to pnpm though.
As I wish to use the latest TS version, I will leave the package at 2.0.0 for now,
Thanks.

@sachaw sachaw closed this as completed Aug 15, 2021
@timostamm
Copy link
Owner

Thank you. Since yarn init -y && yarn add typescript@4.3.5 && yarn add @protobuf-ts/plugin does install, I presume the error only manifests when a node_modules directory is present. I recommend deleting that directory before updating, or - in case that should be insufficient - deleting the lock file as well.

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

No branches or pull requests

2 participants