When the nodejs plugin tries to execute:
$ /root/parts/webthings-gateway/npm/bin/npm install --unsafe-perm --offline --prod
It fails with the error:
npm ERR! code ENOTCACHED npm ERR! request to https://registry.npmjs.org/@fluent%2fbundle failed: cache mode is 'only-if-cached' but no cached response available. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-12-02T19_34_00_110Z-debug.log Failed to run '/root/parts/webthings-gateway/npm/bin/npm install --unsafe-perm --offline --prod' for 'webthings-gateway': Exited with code 1. Verify that the part is using the correct parameters and try again.
We have started to look at overriding the build step with
override-build to run
npm install with less caching, but it seems like that shouldn’t be necessary just to install the npm dependencies.
Any tips on how to make npm happy?
Note: We are using snapcraft 3.9, installed with
$ sudo snap install --candidate snapcraft because with the current released version we got a different error.