2017-08-03 108 views
2

突然之間,我的咕嚕聲 - 貢獻任務是在編譯時拋出Could not find an option named "sourcemap"錯誤。我目前已安裝sass 3.5.1並使用grunt-contrib-sass 1.0.0。任何想法可能導致這種情況?這裏是我看到的輸出:grunt-contrib-sass throwing「找不到一個名爲」錯誤的選項

Could not find an option named "sourcemap". 
Usage: dart-sass <input> 
-s, --style   Output style. 
        [expanded (default)] 
-c, --[no-]color Whether to emit terminal colors. 
    --[no-]trace Print full Dart stack traces for exceptions. 
-h, --help   Print this usage information. 
    --version  Print the version of Dart Sass. 
Warning: Exited with error code 64 Used --force, continuing. 
Done, but with warnings. 
Process terminated with code 0. 

而且,這不是編譯CSS。思考?

+0

看起來你已經安裝了dart和dart-sass現在被稱爲'sass'而不是默認的預期sass? – jedierikb

+0

我在想那不是因爲如果我運行'npm list',我沒有在列表中看到它。我看到npm ERR!無關的:[email protected] ruby​​[email protected]和[email protected]。這些都不在全球範圍內,所以我有點困惑。 –

+1

終於解決了。它看起來像一個壞的npm拉引起我的node_modules文件夾過時。 –

回答

0

我通過刪除node_modules文件夾並讓Visual Studio重新填充此文件夾來解決此問題。