Skip to content

[1.7.3] SCSS Index out of bounds - node-sass 4.8.x #9943

@hccampos

Description

@hccampos

Versions

Angular CLI: 1.7.2
Node: 9.8.0
OS: linux x64
Angular: 5.2.8
@angular/cdk: 5.2.4
@angular/cli: 1.7.2
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.4.5
@angular-devkit/schematics: 0.4.5
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.4.5
typescript-json-schema: 0.21.0
typescript: 2.7.2
webpack: 3.11.0

Observed behavior

When building our app with Angular CLI 1.7.3, we get the following errors.

ERROR in ./apps/cloud/src/common-modules/uploader/drag-and-drop/drag-and-drop.component.scss
Module build failed: 
$palette-brown-800: nth($palette-brown, 9);
                   ^
      Index out of bounds for `nth($list, $n)`
      in /home/hcampos/pix4d/spa/node_modules/@angular-mdl/core/scss/mdl/_color-definitions.scss (line 541, column 21)
ERROR in ./apps/cloud/src/common-modules/map/gizmo/map-gizmo.component.scss
Module build failed: 
$palette-cyan-100: nth($palette-cyan, 2);
                  ^
      Index out of bounds for `nth($list, $n)`
      in /home/hcampos/pix4d/spa/node_modules/@angular-mdl/core/scss/mdl/_color-definitions.scss (line 256, column 20)

Desired behavior

The build should pass as in 1.7.2, since the SCSS code in the @angular-mdl lib seems to be correct.

Mention any other details that might be useful (optional)

The issue seems to be due to node-sass 4.8.x, which gets installed because @angular/cli requests ^4.7.1. We have pinned node-sass to 4.7.2 and everything seems to build normally.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions