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

PR Check: Build failing when PostCSS plugin not found #28

Open
kaelig opened this issue Mar 14, 2022 · 3 comments
Open

PR Check: Build failing when PostCSS plugin not found #28

kaelig opened this issue Mar 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@kaelig
Copy link

kaelig commented Mar 14, 2022

πŸ“– Reproduction steps

  1. In a repository with a PostCSS config file (example below)
  2. Open a PR
// /.postcssrc.json
{
  "plugins": {
    "postcss-preset-env": {},
  }
}

πŸ™ Current Behavior

The Backlight PR check shows:

"Failing after 2s β€” Design system build failed"

As seen in https://github.com/kaelig/kaelig.fr-next/pull/14

The PR Check details show:

Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-preset-env'
Require stack:

/workspace/noop.js
(@/tmp/1l0r0ypst/.postcssrc.json)

πŸ™‚ Expected Behavior

Build works.

πŸ”— Link to the design system

https://backlight.dev/edit/zRlLET1Qkcn3JrnRyWth/design-system

🌐 What browser(s) are you seeing the problem on?

Chrome

Browser version(s)

No response

@kaelig kaelig added the bug Something isn't working label Mar 14, 2022
@bashmish
Copy link

bashmish commented Mar 15, 2022

Tricky one. We don't support a custom PostCSS config (at least not yet). But the error shouldn't happen anyway.

I tried to repro this and see no errors in the PR branch (https://backlight.dev/edit/zRlLET1Qkcn3JrnRyWth/design-system/Button/design/design.link?branch=pr%3A14%40kaelig&p=stories):

image

I clicked through other pages and there are no errors either.
Did you find a workaround?
Can you please record a video or give a screenshot if it's still giving this error to you?

@bashmish
Copy link

Also not sure I fully understand what you mean by the build in this case. It's a PR, I don't think you can make a release build from a PR, for that you need to merge into main first. Therefore I assumed that by build you meant just the regular flow when you load the page and see the result in the right panel.

@kaelig
Copy link
Author

kaelig commented Mar 15, 2022

Also not sure I fully understand what you mean by the build in this case.

In this instance, the word "build" was borrowed from the PR check's status:

build Failing after 2s β€” Design system build failed

Screen Shot 2022-03-15 at 1 33 24 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants