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

CircleCI hangs on Parcel build when Sass is imported into components #4055

Closed
jaredscheib opened this issue Jul 30, 2018 · 6 comments
Closed
Assignees

Comments

@jaredscheib
Copy link
Contributor

From #4043 circle build failing currently: screen shot 2018-07-30 at 1 16 06 pm

@chnn chnn self-assigned this Aug 1, 2018
@chnn chnn mentioned this issue Aug 1, 2018
@chnn chnn closed this as completed in #4071 Aug 1, 2018
@jaredscheib
Copy link
Contributor Author

jaredscheib commented Aug 1, 2018

Still happening. See https://circleci.com/gh/influxdata/chronograf/14247 for example.

@chnn
Copy link
Contributor

chnn commented Aug 1, 2018

@jaredscheib @alexpaxton and I narrowed down the issue.

Parcel appears to hang forever when attempting to build components that import a Sass file.

  • Only happens on linux (e.g. CircleCI environment)
  • Happens with node 8.10.0, 8.11.2, and 10.8.0 (have not tested other versions)
  • Happens with both Yarn 1.5.x and 1.9.2
  • Can be fixed by importing CSS instead of SCSS,
  • Can be fixed by importing the Sass file into ui/src/style/chronograf.scss instead of in a component

We are currently using the latter solution above as a stop gap until we decide upon on a more final solution.

@jaredscheib jaredscheib changed the title Circle timeout on parcel build Parcel hanging on build due to relative vs absolute SCSS imports causes Circle build to timeout Aug 3, 2018
@mavarius
Copy link
Contributor

mavarius commented Aug 3, 2018

While this issue is solved, in part, with the stop gap implemented above; it is not ideal. The shift to moving the stylesheets to the component folder isn't just a folder structure change but was instead a step towards allowing our build process to automatically namespace class names per their component.

The goal is to import the stylesheets into the components and access them as objects in our className props. In order to implement this, Parcel will need to support the scss files imports and our build process will need to include a function to prepend the component name to each class name when compiling our bundled stylesheet.

@jaredscheib
Copy link
Contributor Author

Thanks @mavarius! I say we open an issue with parcel and use this issue to track that. When that issue is resolved, we can refactor our import paths and file structure as you've suggested. Mind filing what you wrote above as an issue in parcel and linking it back here, @chnn?

@chnn
Copy link
Contributor

chnn commented Aug 3, 2018

I'm reluctant to open an issue unless I have a concrete reproduction. It also seems that the parcel maintainers are aware of Sass related issues—see this comment, for example.

I would say let's give this a few weeks to fix itself. Importing Sass inside components vs. inside chonograf.scss is a purely superficial difference on our end. I don't think it blocks scoped CSS either, if that is what we're after.

@mavarius Let's talk at some point about scoped CSS. There's quite a few varieties of scoped CSS out there that function differently. We also need to figure what place it has in Chronograf 1.x vs. 2.x vs. an external reusable UI package.

@chnn
Copy link
Contributor

chnn commented Aug 3, 2018

By the way, I did attempt once more this morning to make the issue reproducible outside of our CircleCI environment. Even running the same exact same Docker image used in our CI worked fine on my local machine.

I was able to narrow it down to a single problematic file, src/style/modules/mixins. Removing that import would make the build run just fine, fwiw.

@chnn chnn changed the title Parcel hanging on build due to relative vs absolute SCSS imports causes Circle build to timeout CircleCI hangs on Parcel build when Sass is imported into components Aug 3, 2018
@russorat russorat closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants