webGavrog@0.0.0 build-dev C:\redacted\webGavrog
webpack --mode development --debug --devtool cheap-module-source-map --output-pathinfo
fatal: ambiguous argument '${GIT_REV}': unknown revision or path not in the working tree.
Replacing ${GIT_REV} with HEAD gives me another error instead
webGavrog@0.0.0 build-dev C:\redacted\webGavrog
webpack --mode development --debug --devtool cheap-module-source-map --output-pathinfo
C:\redacted\webGavrog\node_modules\node-elm-compiler\dist\index.js:85
.on('error', function (err) { throw (err); });
^
Error: spawn elm ENOENT
at notFoundError (C:\redacted\webGavrog\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\redacted\webGavrog\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\redacted\webGavrog\node_modules\cross-spawn\lib\enoent.js:27:25)
It seems that particular line in webpack.config.js had been broken for some time, but my various Unix systems all silently treated ${GIT_REV} as an empty string.
To reproduce
npm run build-dev
Issue
GIT_REV is not listed as an environment variable according to https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables.
Replacing ${GIT_REV} with HEAD gives me another error instead
Solution (for other people) I had no idea what elm was. There's an installer on https://guide.elm-lang.org/install/elm.html, just make sure it's in your PATH.