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

style-dictionary breaks Github Actions pipelines when using pnpm #962

Closed
codingwithchris opened this issue Apr 13, 2023 · 1 comment
Closed

Comments

@codingwithchris
Copy link

codingwithchris commented Apr 13, 2023

Hey, all! After adding style-dictionary to our pnpm monorepo to handle generating our design tokens, all of our pipelines started intermittently breaking. It took us a minute to figure out why, but looking through action logs, we are seeing this in the install step whenever we open a new PR:

WARN  Failed to create bin at /home/runner/work/<repo-name>/<repo-name>/node_modules/.pnpm/node_modules/.bin/style-dictionary. The source file at /home/runner/work/<repo-name>/<repo-name>/node_modules/.pnpm/node_modules/style-dictionary/bin/style-dictionary does not exist.

WARN  Failed to create bin at /home/runner/work/<repo-name>/<repo-name>/packages/tokens/node_modules/.bin/style-dictionary. The source file at /home/runner/work/<repo-name>/<repo-name>/node_modules/.pnpm/style-dictionary@3.7.2/node_modules/style-dictionary/bin/style-dictionary does not exist.

Then, because installation doesn't complete properly, everything breaks in subsequent steps due to missing dependency issues. This only happens in GH Actions and does not happen locally.

After doing a bit of a deep dive, I realized this might be a an pnpm specific issue, as I came across other threads mentioning some variation of this issue with other packages:

pnpm/cmd-shim#43
pnpm/pnpm#5570
pnpm/pnpm#1801
pnpm/pnpm#899

However, out of our comapny monorepo of 18 internal packages with many many dependencies, style-dictionary is the only one that causes a problem despite many others that use a bin directory 😢 So I'm hoping there may be a fix you all have that could solve the issue! Help is much appreciated 🙏.

This is blocking pipelines for our entire company, so I'm going to have to find an alternative solution until this is resolved.

Version details:
style-dictionary: 3.7.2
pnpm: 8.0.0 (also happened in v7, so we upgraded to see if it would fix it)
node: 16.18.0

@dbanksdesign
Copy link
Member

I'm trying to reproduce this, but it might take some time. This sounds like a pnpm issue. Do you know at what step in your GH actions it fails? Like does it fail when trying to install all packages? And what GH actions are you using to set up the env? Here is the test repo I set up: https://github.com/dbanksdesign/sd-pnpm-test

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

3 participants