2017-06-01 39 views
2

我正在使用AngularCLI到Angular2。我將SCSS語法包含在sass預處理器中。但是,當我鍵入ng服務或npm運行生成彈出後,我有這樣的事情。我檢查了目錄,一切正常,我讀了關於SASS加載程序的bug,但現在我已經修復了這個bug的最新版本。有沒有人有想法,我可以修復它?SCSS在angular-cli中加載錯誤

預先感謝您。

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

有一個已知問題sass庫在哪裏它的導入文件時,它不會加載相關文件。對於字體,您可能需要導入絕對路徑到您的src目錄。

問題進行跟蹤here

angular-cli團隊決定關閉它,因爲它是與sass LIB而非cli的問題。