Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.

The following error was reported for the VUE project

Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:121:11)
    at Object.join (path.js:375:7)
    at getSassOptions (D:\VueProj\test\node_modules\sass-loader\dist\utils.js:160:37)
    at Object.loader (D:\VueProj\test\node_modules\sass-loader\dist\index.js:36:49)

sass-loader version is too high cause, reinstall the lower version of sass-loader.

npm uninstall sass-loader
npm install --save-dev [email protected]

Read More: