1. 程式人生 > 其它 >報錯:vue專案使用scss遇到UnhandledPromiseRejectionWarning: TypeError [Eefined

報錯:vue專案使用scss遇到UnhandledPromiseRejectionWarning: TypeError [Eefined

技術標籤:錯錯錯

報錯:
在這裡插入圖片描述
(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)

(node:35280) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. will terminate the Node.js process with a non-zero exit code.
在這裡插入圖片描述
還遇到過的報錯:
{ parser: “babylon” } is deprecated; we now treat it as { parser: “babel” }.
UnhandledPromiseRejectionWarning: TypeError
[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",

就解決了
但我其實不懂為什麼這樣可以解決