Help with custom Rule sets and Yarn v2 #2175
-
hello! i'm a n00b to spectral and looking for a little help getting going with publishing and consuming specs with yarn. is there a best channels for this? i tried to publish a yaml ruleset using the npm guide here: https://meta.stoplight.io/docs/spectral/ZG9jOjI1MTky-sharing-and-distributing-rulesets#npm, which didnt quite work in consuming it into a project with yarn v2. backed up and built the actual example from https://meta.stoplight.io/docs/spectral/ZG9jOjI1MTky-sharing-and-distributing-rulesets#npm, and it's basically the same error. publishing seems to work fine - it's consuming where i'm struggling. in my consuming project, i've got this in my package.json:
and i've got a .spectral.yml in my repo:
when i do:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Pretty sure I tracked this down - looks like yarn v2 by default uses PnP mode - not node_modules which spectral seems to expect. Fixed by flipping yarn back into node_modules mode by adding this to my project's .yarnrc.yml:
|
Beta Was this translation helpful? Give feedback.
Pretty sure I tracked this down - looks like yarn v2 by default uses PnP mode - not node_modules which spectral seems to expect. Fixed by flipping yarn back into node_modules mode by adding this to my project's .yarnrc.yml: