You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to migrate bootstrap scss, then this error occur
SassError: Module loop: this module is already being loaded.
The cause of this error is that migrator is importing unnecessary modules which causing a module loop. For example :
This is a code of _variable.scss
// Variables//// Variables should follow the `$component-state-property-size` formula for// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.// Color system$white: #fff!default;
$gray-100: #f8f9fa!default;
$gray-200: #e9ecef!default;
$gray-300: #dee2e6!default;
$gray-400: #ced4da!default;
$gray-500: #adb5bd!default;
$gray-600: #6c757d!default;
$gray-700: #495057!default;
$gray-800: #343a40!default;
$gray-900: #212529!default;
$black: #000!default;
$grays: () !default;
.....
Now when i migrated this code using migrator, resulting code is this
@use"sass:color";
@use"sass:list";
@use"sass:map";
@use"sass:string";
@use"functions";
// Variables//// Variables should follow the `$component-state-property-size` formula for// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.// Color system$white: #fff!default;
$gray-100: #f8f9fa!default;
$gray-200: #e9ecef!default;
$gray-300: #dee2e6!default;
$gray-400: #ced4da!default;
$gray-500: #adb5bd!default;
$gray-600: #6c757d!default;
$gray-700: #495057!default;
$gray-800: #343a40!default;
$gray-900: #212529!default;
$black: #000!default;
$grays: () !default;
As you can see it is importing module function which is not required and function module is already importing variable which caused an module loop error.
The text was updated successfully, but these errors were encountered:
Looking at the full source, it looks like _variables.scss and _functions.scss actually do depend on each other (so @use "functions" is required in _variables.scss and vice-versa). The migrator can't handle circular dependencies, so it should error here, but some manual effort to break the cycle will be required to actually migrate Bootstrap.
I was trying to migrate bootstrap scss, then this error occur
The cause of this error is that migrator is importing unnecessary modules which causing a module loop. For example :
This is a code of _variable.scss
Now when i migrated this code using migrator, resulting code is this
As you can see it is importing module
function
which is not required andfunction
module is already importingvariable
which caused an module loop error.The text was updated successfully, but these errors were encountered: