nodejs plugin doesn't set npm path for custom node version
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
The nodejs plugin allows a developer to specify a specific version of node to be used (which I needed to do because electron-packager needs at least 10.12 and the default is 8.10). E.g.
parts:
my-part:
plugin: nodejs
nodejs-version: 12.18.2
When I set a custom node version as above, I can see the build.snapcraft.io build server downloading node-v12.18.2-linux-armv7l.tar.gz, but then it still seems to use node 8.10.0 to execute commands so electron-packager still can't run.
After getting advice from ogra in IRC I managed to work around this by manually setting the path in overide-build:
PATH=$PATH:$SNAPCRAFT_PART_SRC/../npm/bin
Full build log here: https://build.snapcraft.io/user/krellian/kiosk/1034267
Evaluation history
No evaluation history available.