Path Argument Error When Using webpack With less-loader

I'm currently in the process of trying to upgrade the version of webpack in an old Angular project, which doesn't use the Angular CLI. I made the necessary modifications to upgrade from version 3 to version 4, but was getting the following error with less-loader:

(node:672) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.normalize (path.js:266:5)
    at new LessError (C:\DevGit\MyOrg.Portal\MyOrg.Portal.Mvc\Resources\ng\node_modules\less-loader\dist\LessError.js:15:169)
    at C:\DevGit\MyOrg.Portal\MyOrg.Portal.Mvc\Resources\ng\node_modules\less-loader\dist\index.js:62:14

This had me tweaking the webpack config endlessly, until finding out that this is apparently an issue in less-loader v6. When I downgraded to v5.0.0, the problem went away...leaving me with the next problem to troubleshoot. Baby steps! One down, at least one more to go...

Comments

Popular Posts

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

Silent Renew and the "login_required" Error When Using oidc-client

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4

How to Determine if a Column Exists in a DataReader