I’m attempting to build a snap for nativefier, and I’m having a ton of trouble getting it to successfully build. I’ve tried a lot of various ideas borrowed from forum posts here, and from examples of snapcraft.yaml
files on GitHub. I’m really at a loss and could use an assist. I think this might be a fun snap for people to use.
Here’s the current (28 JAN 2022) version of my snapcraft.yaml
:
name: nativefier
adopt-info: nativefier
summary: Nativefier is a command-line tool to easily create a “desktop app”
description: |
Nativefier is a command-line tool to easily create a “desktop app” for any web site with minimal fuss.
Apps are wrapped by Electron (which uses Chromium under the hood) in an OS executable (.app, .exe, etc) usable on Windows, macOS and Linux.
license: MIT
base: core20
grade: stable
confinement: strict
assumes:
- command-chain
environment:
npm_config_prefix: '$SNAP_COMMON'
npm_config_unsafe_perm: 'true'
npm_config_global: 'true'
apps:
nativefier:
command: nativefier
command-chain:
- bin/homeishome-launch
plugs:
- network
- home
parts:
nativefier:
plugin: npm
npm-node-version: "16.13.2"
build-environment:
- npm_config_global: 'true'
- npm_config_prefix: '$SNAP_COMMON'
- npm_config_unsafe_perm: 'true'
source: https://github.com/nativefier/nativefier.git
source-type: git
override-pull: |
snapcraftctl pull
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"
homeishome-launch:
plugin: nil
stage-snaps:
- homeishome-launch
Here’s the current error I’m getting:
npm ERR!
command
sh -c cd app && npm ci && cd .. && npm run build
npm ERR! npm ERR! code ECIGLOBAL npm
ERR! npm ERR! `npm ci` does not work for global packages npm
ERR!
npm ERR!
npm ERR! A complete log of this run can be found in: npm ERR! npm ERR! /root/.npm/_logs/2022-01-28T20_24_00_963Z-debug.log
npm
Thanks in advance.
P.S. I’m using Fabrica to conduct these builds - because it’s awesome. Thanks @ogra!