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

Setting workspace depencyType throws uncaught runtime error #84

Closed
Coobaha opened this issue Jun 26, 2022 · 5 comments
Closed

Setting workspace depencyType throws uncaught runtime error #84

Coobaha opened this issue Jun 26, 2022 · 5 comments

Comments

@Coobaha
Copy link

Coobaha commented Jun 26, 2022

Description

hi @JamieMason after 2d1bf05#diff-c58dda308b363b6022c8a03f2d4ae8fd387425eb7a733f166bfd7d93d68ef11fL12

I am getting uncaught TypeError in a yarn workspace codebase

dependencies @org/package ^0.1.1
workspace @org/package ^0.1.1
~/node_modules/syncpack/dist/bin-set-semver-ranges/set-semver-ranges.js:18
                root[dependencyType][name] = nextVersion;
                                           ^
@JamieMason
Copy link
Owner

Can you edit your local install at node_modules/syncpack/dist/bin-set-semver-ranges/set-semver-ranges.js to include this log, run syncpack again, then share the output?

+ console.log(
+   require('util').inspect(
+     { input, dependencyType, name, version, wrapper },
+     false,
+     null,
+     true,
+   ),
+ );
root[dependencyType][name] = nextVersion;

@Coobaha
Copy link
Author

Coobaha commented Jun 27, 2022

Sorry I can't just dump outputs at the moment, cause it contains private codebase data. I will try to make a reproducible example later this week. Meanwhile maybe it might help, we enforce explicit dependencies for packages, so they also have workspace packages listed in package.json (I assume thats why same package is logged twice in my initial message)

@JamieMason
Copy link
Owner

That's understandable, no worries. If you can make a repro that would be great, at the moment I don't have enough to work with to know what it could be.

@Coobaha
Copy link
Author

Coobaha commented Jun 27, 2022

Hey, here is the repro https://stackblitz.com/edit/github-nztxhj-ks9wvj?file=package.json

image

@JamieMason
Copy link
Owner

Released in 8.3.8, thanks a lot.

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

No branches or pull requests

2 participants