When running npm run gem from the top-level gsgo directory, this error may occur:
On MACOS: It appears to occur when running in the VSCode Integrated Terminal, but does not appear in a the Terminal App.
DIAGNOSIS
In 2022, Node versions greater than v16 deprecated an insecure hash routine called MD4, and this is the cause of the error when webpack is being used programmatically within the gem-app-srv program that builds the app in development mode. This article provides a background as well as some insecure workarounds.
However, we are NOT using a NodeJS version greater than v16; our .nvmrc version (applied with the nvm use command) is v14.18.1! It appears that some elements of the webpack build system are ignoring the current version and are invoking the default node version of your system, and this apparently happens only inside VSCode's integrated terminal.
WORKAROUNDS
When using the VSCode Integrated Terminal (opened via ctrl-tilde):
From the gsgo directory, npm run gem
Use nvm use followed by nvm ls to see what the current in-use version of Node is. If you see an arrow pointing to something different than v14.18.1, try nvm alias default v14.18.1 to set the default version of node system-wide and try again.
Developing Issue...
SYMPTOMS
When running
npm run gem
from the top-levelgsgo
directory, this error may occur:On MACOS: It appears to occur when running in the VSCode Integrated Terminal, but does not appear in a the Terminal App.
DIAGNOSIS
In 2022, Node versions greater than v16 deprecated an insecure hash routine called
MD4
, and this is the cause of the error when webpack is being used programmatically within thegem-app-srv
program that builds the app in development mode. This article provides a background as well as some insecure workarounds.However, we are NOT using a NodeJS version greater than v16; our
.nvmrc
version (applied with thenvm use
command) is v14.18.1! It appears that some elements of the webpack build system are ignoring the current version and are invoking the default node version of your system, and this apparently happens only inside VSCode's integrated terminal.WORKAROUNDS
When using the VSCode Integrated Terminal (opened via
ctrl-tilde
):gsgo
directory,npm run gem
nvm use
followed bynvm ls
to see what the current in-use version of Node is. If you see an arrow pointing to something different than v14.18.1, trynvm alias default v14.18.1
to set the default version of node system-wide and try again.