2

I'm using to AngularCLI to Angular2. I included sass preprocessor with SCSS syntax. But when i type ng serve or npm run build after eject i got something like this. I checked the directories and everything was fine, i read about SASS loader bug, but now i have the newest version where that bug is fixed. Does anyone have idea how i can fix it ?

Thank you in advance.

ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-
loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss 
Module not found: Error: Can't resolve '../images/arrow_bullet-01.png' in 
'F:\Angular2Tests\bootstrapscss\src'
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?
{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss  
6:87042-87082
@ ./src/styles.scss
@ multi ./src/styles.scss

ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-
loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss
Module not found: Error: Can't resolve '../fonts/glyphicons-halflings-
regular.eot' in 'F:\Angular2Tests\bootstrapscss\src'
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?
{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss 
6:243131-243183 6:243206-243258
@ ./src/styles.scss
@ multi ./src/styles.scss

ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-
loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss
Module not found: Error: Can't resolve '../fonts/glyphicons-halflings-
regular.woff' in 'F:\Angular2Tests\bootstrapscss\src'
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?
{"ident":"postcss"}!./~/sass-loader/lib/loader.js?
{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss 
6:243310-243363
@ ./src/styles.scss
@ multi ./src/styles.scss

1 Answer 1

1

There is a known issue with the sass library where it won't load files relative to it's importing file. For fonts, you might be required to import with an absolute path to your src directory.

The issue is tracked here

The angular-cli team decided to close it as it is an issue with the sass lib rather than the cli.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.