Yarn: Regression between 0.16.1 and 0.17.0 when building package using node-gyp?

Created on 15 Nov 2016  路  4Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Cannot run yarn on Travis-CI with 0.17.0

If the current behavior is a bug, please provide the steps to reproduce.

Install yarn with the recommended method

https://github.com/MoOx/phenomic/blob/9c63590fad541ff7be9af237954704fe4df88815/.travis.yml#L13-L20

(get 0.17.0)

https://travis-ci.org/MoOx/phenomic/jobs/175953792#L668

Run yarn and wait for failure because of leveldown

https://travis-ci.org/MoOx/phenomic/jobs/175953792#L681

yarn install v0.17.0

[1/4] Resolving packages...

[2/4] Fetching packages...

warning [email protected]: The platform "linux" is incompatible with this module.

info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.

[3/4] Linking dependencies...

[4/4] Building fresh packages...

error Error running install script for optional dependency: "/home/travis/build/MoOx/phenomic/node_modules/fsevents: Command failed.\nExit code: 127\nCommand: sh\nArguments: -c node-pre-gyp install --fallback-to-build\nDirectory: /home/travis/build/MoOx/phenomic/node_modules/fsevents\nOutput:\nsh: 1: node-pre-gyp: not found"

info This module is OPTIONAL, you can safely ignore this error

error /home/travis/build/MoOx/phenomic/node_modules/leveldown: Command failed.

Exit code: 127

Command: sh

Arguments: -c prebuild --install

Directory: /home/travis/build/MoOx/phenomic/node_modules/leveldown

Output:

sh: 1: prebuild: not found

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

What is the expected behavior?

Not fatal error, this was totally ok with 0.16.1 a day before

https://travis-ci.org/MoOx/phenomic/jobs/175489470#L805

(not that if you check my build history, you will find some yarn install passing using 0.17.0 but this was due to travis cache I setup for node_modules. Since I cleaned the cache (for another failure I was suspecting), I cannot make yarn work.

Please mention your node.js, yarn and operating system version.

$ node --version

v6.9.1

$ npm --version

3.10.8

$ nvm --version

0.32.0

yarn 0.17.0

Most helpful comment

Until this is fixed, you can temporarily roll back by doing this instead of apt-get install yarn:

wget https://yarnpkg.com/downloads/0.16.1/yarn_0.16.1_all.deb
sudo dpkg -i yarn_0.16.1_all.deb

I'll work on keeping multiple versions of Yarn in the Debian repo to make it easier in the future.

All 4 comments

Until this is fixed, you can temporarily roll back by doing this instead of apt-get install yarn:

wget https://yarnpkg.com/downloads/0.16.1/yarn_0.16.1_all.deb
sudo dpkg -i yarn_0.16.1_all.deb

I'll work on keeping multiple versions of Yarn in the Debian repo to make it easier in the future.

Sure that's what I am doing. Thanks!

0.17.3 should fix it, can you please confirm?

@bestander worked for me, but I had to yarn cache clean and blow away my node_modules to get it to work. Just upgrading yarn broke my native packages.

Was this page helpful?
0 / 5 - 0 ratings