Uglify silently failing with latest version of Node
martynmjones opened this issue · 1 comments
martynmjones commented
Describe the bug:
When building the extension Uglify fails to create the minified version of assets/js/admin-ga-settings.js
without reporting an error. This was only noticed due to the SVN diff highlighting the file was missing when submitting to the .org repo.
Steps to reproduce:
- Clone repo
- Run
nvm use node
to get the latest version - Run
npm i
- Run
npm run uglify
Expected behavior:
The file assets/js/admin-ga-settings.min.js
should be created once the process is complete.
Actual behavior:
There is no feedback suggesting it failed but the file isn't created.
Additional details
We could look to update the version of Uglify but should also add a .nvmrc
file to avoid future issues.
martynmjones commented
The issue here isn't with the version of Uglify but instead with the NPM script itself. $npm_package_*
isn't available in NPM version 7+ which is currently being using by the build script.