My builds have started failing on the (non-LTS) linux VM since the recent changes but still run fine on Mac.
Its an electron app built on the two platforms and I already use the nvm
step to ensure we’re pinned to node v7.
The module html-minifier
hasn’t changed in over a month but the following command started failing on the linux build today:
html-minifier --input-dir ./src --output-dir ./dist --file-ext html --collapse-whitespace --conservative-collapse --remove-comments
results in the error:
error: unknown option '--file-ext'
The only thing left to explore is that the yarn upgrade 0.24.6 > 0.27.5 has added a yarn bug which is affecting npm script parsing/execution on linux.
Is there a way to force the old VM image so I can test that the VM change is actually what’s caused it?
1 Like
Hi @timfish ,
That step is not maintained by us - are you sure that the Node version is actually the one you want? Can you please add this line to your script, right before you’d call html-minifier
:
node --version
Note: our current recommended way of handling installing the right Node version is: How can I downgrade NodeJS? / How to install a specific NodeJS version?
You can download older images from Docker and run it locally on your Mac/PC (related guide: Running your build locally in Docker - Bitrise Docs )
Yep, I already checked the versions are correct so the nvm step appears to be working for now but I will migrate over:
+ yarn versions
yarn versions v0.27.5
{ http_parser: '2.7.0',
node: '7.10.0',
v8: '5.5.372.43',
uv: '1.11.0',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '51',
openssl: '1.0.2k',
icu: '58.2',
unicode: '9.0',
cldr: '30.0.3',
tz: '2016j' }
I did try to set the previous image buy putting bitrise/docker-android:v2017_07_01-07_18-b630
in the bitrise config but got an error.
Unable to find image 'bitrise/docker-android:v2017_07_01-07_18-b630' locally
docker: Error response from daemon: repository bitrise/docker-android not found: does not exist or no pull access.
ah, I was looking for bitriseio/android-ndk:v2017_07_01-07_30-b570
1 Like
That’s the one
Tip: if you don’t need the ndk bits, feel free to use the Android one (https://hub.docker.com/r/bitriseio/docker-android/ ) (instead of the android-ndk). That’s significantly smaller
I dont actually need any android stuff so a basic ubuntu16 with bitrise-cli
would probably suffice.
bitriseio/android-ndk:v2017_07_01-07_30-b570
added 12m to the build
Using bitriseio/docker-android:v2017_07_01-07_18-b630
added 11m to the build
So there isn’t much in it. Do you want to add either of them to your cache for a while?
Both did fix my issue though so I’ll probably do some more testing on my linux laptop and depending on the results report a bug in yarn!
It turns out yarn is putting the wrong version in .bin.
Here is the offending yarn bug:
opened 07:39PM - 02 Jul 17 UTC
closed 05:45PM - 10 Jul 17 UTC
high-priority
triaged
Reproduce with
```
git clone git@github.com:vega/vega-lite.git
cd vega-lite…
rm yarn.lock
yarn
node_modules/.bin/uglifyjs --version
```
Prints `uglify-js 2.8.29` but should print version 3.
1 Like
Good catch @timfish !
Did you find a fix for this?
Its marked as high priority bug and somebody has submitted a PR to fix it.
Until this is fixed, the current workarounds are:
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.24.6
export PATH="$HOME/.yarn/bin:$PATH"
npm run ...
1 Like
Update
Its fixed in this pre-release version:
Great solutions, thanks for sharing @timfish !
If that will be available on their apt server this week then the weekend VM/Stack updates will include it
Thanks again @timfish for all the infos!