Terra-mixins import in StatusView.scss causes build to fail
See original GitHub issueIssue 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:
- Created 5 years ago
- Reactions:4
- Comments:9 (9 by maintainers)
Top GitHub Comments
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
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.
Thanks @ChaseSinclair @CoryMcDonald @AnthonyRoss