報錯:vue專案使用scss遇到UnhandledPromiseRejectionWarning: TypeError [Eefined
阿新 • • 發佈:2020-12-27
技術標籤:錯錯錯
報錯:
(node:35280) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .caton without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
還遇到過的報錯:
{ parser: “babylon” } is deprecated; we now treat it as { parser: “babel” }.
[ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined
使用的版本:
"node-sass": "^5.0.0",
"sass-loader": "^10.1.0",
把版本降級:
"node-loader": "^0.6.0", "node-sass": "^4.14.1",
就解決了
但我其實不懂為什麼這樣可以解決