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.

stylePreprocessorOptions loads node_modules instead of scss

See original GitHub issue

Using @import 'file' imports from node_modules when the file is named the same way any node module is named.

Angular.json

"stylePreprocessorOptions": {
              "includePaths": [
                "src/styles"
              ]
            },

Existing files

src 
   - styles
          - _globals.scss
          - _rxjs.scss

my-component.scss

@import 'globals';

-> Imports node-module “globals” index.js

my-component.scss

@import 'rxjs';

-> Imports node-module “rxjs” index.js

Version @angular/cli: 6.0.0-rc.7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:20

github_iconTop GitHub Comments

11reactions
iowazcommented, May 4, 2018

This also happens if file name is ‘colors’

7reactions
krismeistercommented, Sep 28, 2018

If anyone finds this in the short future, until the commits above are merged. I am on:

Angular CLI: 6.2.3
Angular: 6.1.9

Downgrading sass-loader in package.json fixed this issue for me.

  "dependencies": {
        ...
        "sass-loader": "~6.0.7",
        ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

angular.json includePaths is not workings for node_modules
1 Answer 1 · How to reference external node_modules css? I use Angular library which contains component using external css: @import " ...
Read more >
systelab-components - npm
After, you must add the following styles, stylePreprocessorOptions and scripts in the angular.json file,. "styles": [ "node_modules/ag-grid- ...
Read more >
Using Pre-Processors - Vue Loader
Any content inside the block will be processed by webpack as if it's inside a *.scss file. # Sass vs SCSS. Note that...
Read more >
SASS "includePaths" in angular.json is not recognized when ...
I have an Angular monorepo project. I've set projects.public.architect.build.options.stylePreprocessorOptions.includePaths to be ["projects/public/src/ ...
Read more >
How to use SCSS mixins with angular 7? - GeeksforGeeks
scss " ], "stylePreprocessorOptions": { "includePaths": [ "../node_modules/bootstrap/scss" ] },. Using Bootstrap Sass Files: Another scenario we' ...
Read more >

github_iconTop Related Medium Post

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