Encountering the following error when using gulp-sass?:
1 2 3 |
Sass error: { status: 3, message: 'unordered_map::at: key not found', code: 3 } |
Here’s how to fix this:
The problem
Chances are you are using SASS maps where your keys are not strings:
1 2 3 4 5 6 7 8 9 10 11 |
// This: $colors: ( red : #f00; green : #0f0; blue : #00f; ); // and/or this: p { color: map-get($colors, red); } |
The solution
The fix is really simple, just wrap them names in quotes:
1 2 3 4 5 6 7 8 9 10 11 |
// This: $colors: ( 'red' : #f00; 'green' : #0f0; 'blue' : #00f; ); // and/or this: p { color: map-get($colors, 'red'); } |
Problem solved!
Visitors give this article an average rating of 5.0 out of 5.
How would you rate this article?
★ ★ ★ ★ ★