Yarn in a snap, help needed to debug


With help from Jeff Dickey here at the Ubuntu rally we got yarn packaged. It seems to work nicely, except for the node packages that require node-gyp.

I am not very good at strace, so I will need a hand to figure out what is going on here.

To reproduce:

$ wget http://people.ubuntu.com/~elopio/snaps/yarn_master_amd64.snap
$ sudo snap install yarn*.snap --dangerous --classic
$ mkdir ~/yarntest && cd ~/yarntest
$ yarn add sqlite
error /home/elopio/yarntest/node_modules/sqlite3: Command failed.
Exit code: 127
Command: node-pre-gyp install --fallback-to-build
1 Like

have you got a compiler installed?

per the node-gyp readme:

You will also need to install:

*On Unix*
- python (v2.7 recommended, v3.x.x is not supported)
- make
- A proper C/C++ compiler toolchain, like GCC

Thanks for the help @lucyllewy. I had more chance to debug it this week and found that the error was because node-pre-gyp was not finding node. I added it to $PATH, and now it works!

I’ll make the request for classic, and publish it to edge for testing.

1 Like