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

SCSS file: can't find stylesheet to import #737

Open
greefhorst opened this issue Feb 20, 2024 · 1 comment
Open

SCSS file: can't find stylesheet to import #737

greefhorst opened this issue Feb 20, 2024 · 1 comment

Comments

@greefhorst
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

The bootstrap-switch.scss has two broken import statements, refering to bootstrap-4.2.1.

Error: Can't find stylesheet to import.
   ╷
14 │ @import "../bootstrap-4.2.1/functions";
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/bootstrap-switch/src/sass/bootstrap4/bootstrap-switch.scss 14:9  @import

This can be fixed by adding bootstrap to your package.json requirements and applying the following patch.

Here is the diff that solved my problem:

diff --git a/node_modules/bootstrap-switch/src/sass/bootstrap4/bootstrap-switch.scss b/node_modules/bootstrap-switch/src/sass/bootstrap4/bootstrap-switch.scss
index 63d9951..715c631 100644
--- a/node_modules/bootstrap-switch/src/sass/bootstrap4/bootstrap-switch.scss
+++ b/node_modules/bootstrap-switch/src/sass/bootstrap4/bootstrap-switch.scss
@@ -11,8 +11,8 @@
 $bootstrap-switch-border-radius: 4px;
 $bootstrap-switch-handle-border-radius: 3px;
 
-@import "../bootstrap-4.2.1/functions";
-@import "../bootstrap-4.2.1/variables";
+@import "bootstrap/scss/functions";
+@import "bootstrap/scss/variables";
 
 .bootstrap-switch {
 	display: inline-block;

This issue body was partially generated by patch-package.

@ZHLHLTL
Copy link

ZHLHLTL commented Feb 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants