I have a snap that i wanted to upgrade from core18 to core20. So that means instead of using the nodejs plugin, I have to use the npm plugin.
While it builds fine with the nodejs plugin, it fails with the npm plugin, with this error:
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild sh: 1: prebuild-install: Permission denied sh: 1: node-gyp: Permission denied npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT
The old snapcraft.yaml:
base: core18 grade: stable confinement: strict parts: my-part: plugin: nodejs nodejs-version: "12.18.3" nodejs-package-manager: yarn nodejs-yarn-version: "v1.22.4" source: . source-type: local
The new snapcraft.yaml:
base: core20 grade: stable confinement: strict parts: my-part: plugin: npm npm-node-version: "12.18.3" source: . source-type: local
The only matching forum post i found seemed to have it fixed for the nodejs plugin.