question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Terra-mixins import in StatusView.scss causes build to fail

See original GitHub issue

Issue Description

Terra-mixins import in StatusView.scss sporadically fails to build. Deleting node_modules and re-installing resolves the issue, however this takes a long time. This happens several times a day and has been reported by multiple people.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

The terra-mixins import in StatusView.scss does not cause the build to fail.

Current Behavior

Build will sporadically fail with the following:

ERROR in ./node_modules/css-loader??ref--2-2!./node_modules/postcss-loader/lib??ref--2-3!./node_modules/sass-loader/lib/loader.js??ref--2-4!./node_modules/terra-status-view/lib/StatusView.scss Module build failed: @import ‘~terra-mixins’;

Steps to Reproduce

I have not determined the exact steps to reproduce, but it seems to occur more often when switching between running the app server, running storybook or running jest/wdio tests.

Environment

  • Component Version: React 16
  • Browser Name and Version: Chrome Version 66.0.3359.139
  • Operating System and version (desktop or mobile): MacOS Sierra 10.12.6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
corymcdonaldcommented, Jun 8, 2018

Our application is on v7 of sass-loader.

I think I tracked it down at least my issue. If you look at the sass-loader changelog you will see the following breaking change documented

The sass-loader throws an error at runtime now and refuses to compile if the peer dependency is wrong. This could break applications where npm’s peer dependency warning was just ignored.

I downgraded Terra-Status-View to version 2.3.0. I was able to run yarn install and webpack-dev-server just fine. Then I upgraded to Terra-Status-View 2.4.0. This caused the File to import not found or unreadable: ~terra-mixins. error to appear.

Status-View 2.3.0 had the same terra-mixin version as a peerDependency Status-View 2.4.0 introduced the different terra-mixin versions here

I’m going to submit a PR that will at least get these on the same version and maybe that can alleivate some of the issue. Albeit I don’t know if this is the root cause, however it seemed to be one of them for me.

3reactions
mjhenkescommented, Jun 13, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 8 Universal Build Failed on SCSS Imports
I faced the same issue "ERROR in Module build failed... Can't find stylesheet to import" while running the same command to build ssr ......
Read more >
Sass: @import
The @import rule has a number of serious issues: @import makes all variables, mixins, and functions globally accessible. This makes it very difficult...
Read more >
CSS, SCSS, and Less support in Visual Studio Code
Step 2: Create a simple Sass or Less file. Open VS Code on an empty folder and create a styles.scss or styles.less file....
Read more >
Stop using @import with Sass | @use and @forward explained
Keep up to date with my Sass course: https://beyondcss.dev/?utm_campaign=OlderYouTubeVideos&utm_source=YouTubeThe use of @ import has been ...
Read more >
Introducing Sass Modules - CSS-Tricks
Import built -in Sass modules. Internal Sass features have also moved into the module system, so we have complete control over the global ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found