Closed adius closed 5 years ago
Root cause looks to be that jade-legacy
fails because it can't find uglify-js
. No idea why, it's listed in package.json https://github.com/jnordberg/jade-legacy/blob/master/package.json#L33
Maybe that would be fixed by #325 :)
FYI: anyone trying to dupe this issue who doesn't have yarn installed, make sure you install it via npm, not apt, as the yarn from apt in cmdtest isn't the same program.
I managed to dupe the issue on Ubuntu 16.04.02 and 17.04, but oddly yarn list
doesn't show uglify-js anywhere, even under jade-legacy despite that it's in that package's package.json. My guess is that this is actually an issue with yarn, or at the very least a question for the yarn devs--maybe there's a reason it doesn't install uglify-js? On a quick inspection I couldn't find another package in the deps that didn't get installed, but that probably needs a more thorough check.
Updating to pug may fix it, but I'm only part sure because I merely replaced the node_modules/wintersmith packaged with a checkout of the pug-migrate branch and ran yarn in it to try and duplicate yarn's steps. What's weird is that doing this with the main wintersmith package doesn't result in uglify appearing in node_modules. Also odd is that jade-legacy specifies a newer version of uglify than pug. In pug, uglify appears as a requirement of its components. This still doesn't explain why yarn installs uglify for pug and not for jade-legacy.
Two notes: manually adding uglify in the mainline wintersmith package:
//after cloning and running yarn
cd node_modules/wintersmith
yarn add uglify-js
//return to repo root
cd ../../
Then returning to the repo root and running yarn build
worked, except that the two consts in templates/fragen.jade in table#questionstable
, capitalize and formatedCategories, threw errors as they are previously declared on the first run of the loop; I changed them to vars and everything worked.)
I still suspect this is a good question for the yarn people; it's odd that it doesn't install uglify-js for jade-legacy.
EDIT: also note that, if you do use the pug update, you'll have to rename a number of files and change the template arguments in their meta.
Any update on this?
I'm unable to reproduce with yarn 1.5.1. Is this still a problem?
Steps to reproduce:
git clone https://github.com/adius/Schifferpatent
cd Schifferpatent
yarn
yarn build
yields