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.

import some scss files into library component scss throw errors

See original GitHub issue

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

when trying to import bootstrap mixins @import “~bootstrap/scss/mixins”; it throw the following error ERROR: Can’t find stylesheet to import.

How To Reproduce

clone https://github.com/robertIsaac/scss-reproduce run ng build

Expected Behaviour

to build successfully

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr:            9.1.3
@angular/compiler:     9.1.4
rollup:                2.7.5
tsickle:
typescript:            3.8.3

Please include all version numbers that might be relevant, e.g. third-party libraries

bootstrap: 4.4.1

notes

this is created by suggestion of https://github.com/angular/angular-cli/issues/17660#issuecomment-625194173

i do another two imports and they are working fine

@import "~boosted/scss/functions";
@import "~boosted/scss/variables";
@import "~boosted/scss/mixins";

and changing the import to @import "~boosted/scss/_mixins"; will make the build run successfully

it can be related to that there is a directory named mixins inside the bootstrap/scss directory, it’s just a a guess

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

6reactions
Sapendocommented, Nov 28, 2020

Any updates?

0reactions
nhhockeyplayercommented, Mar 25, 2022

why cant this be fixed? who is holding down this repo? this should have been part of the functionality prior to this even being public is the code that brittle?

Read more comments on GitHub >

github_iconTop Results From Across the Web

import some scss files into library component scss throw errors
when trying to import bootstrap mixins @import "~bootstrap/scss/mixins"; it throw the following error ERROR: Can't find stylesheet to import.
Read more >
How to import SCSS library with assets in Angular application?
scss , I'm getting a compilation error, because the compiler can't resolve the path to the image for some reason, however, the path...
Read more >
sass-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Angular - Shortcut to Importing Styles Files in Components
In a typical Angular project, you'll have many components. Each components has it own stylesheet (css, scss, less, etc).
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
This error is generated because the compiler is only able to import files from the src folder. Here, the CSS file is saved...
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