After setting up my new development environment on Windows 10, I encountered an issue with less.
Following the instructions on lesscss.org, I installed less using:
npm install -g less
The installation process completed without any errors.
However, when trying to compile a .less file in the command line:
lessc input.less output.css
I received the following error message:
[TypeError: undefined is not a function]
Even after attempting to reinstall less and npm, the issue persisted. On my old system, compiling the same file worked perfectly. It appears that there may be a problem with the runtime environment on my new machine causing lessc to call an undefined function.
What would be the most effective approach to identifying and resolving this error?