Nativescript released 5.4.0 where hmr is enabled by default. After upgrade to 5.4.0, my nativescript cloud build as well as local build started breaking with following error
The solution was the following:
From the project root run
./node_modules/.bin/update-ns-webpack --deps --configs
This updates package.json and node_modules.
Then I removed the following folders.
node_modules, platform, hooks
And do a clean run
tns run android