Documentation at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/tools/using_grunt.html states to install grunt using the -g (global) command, which requires elevated privileges. Unfortunately many shared hosting systems out there exist which cannot allow installing binaries globally.
It appears that this may be required if you want to use grunt - and thus be able to output source map files, giving one the ability to develop a Magento 2 frontend with some semblance of efficiency.
OK, so what if you can't install it globally? I installed npm directly to the magento root folder along with grunt-cli and lessc. I run grunt by referencing its full path name: "~/public_html/node_modules/grunt-cli/bin/grunt". With a properly configured themes.js (or custom-themes.js and a modified grunt-config.json that points to it), attempting to run the exec task against the blank theme results in an error:
[public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank Running "exec:blank" (exec) task >> /bin/sh: grunt: command not found >> Exited with code: 127. >> Error executing child process: Error: Process exited with code 127. Warning: Task "exec:blank" failed. Use --force to continue. Aborted due to warnings. Execution Time (2020-05-12 22:13:15 UTC-0) loading tasks 87ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 78% loading grunt-exec 2ms ▇▇ 2% exec:blank 23ms ▇▇▇▇▇▇▇▇▇▇▇▇▇ 21% Total 112ms
I presume that some additional modification within the myriad of .js files in the /dev/tools/grunt folder is required. Anyone have any knowledge about this? Trying to search through .less files for css classes is extremely cumbersome.