flatpak-builder version
1.4.4
Linux distribution and version
Fedora 42
Affected flatpak-builder tool
node/flatpak-node-generator.py
flatpak-builder tool cli args
No response
Source repository URL
No response
Flatpak-builder manifest URL
https://github.com/hfiguiere/flatpak-builder-node-reproducer.git
Description
Checkout the repository above. It's a reproducer case, not meant to be a meaningfull flatpak.
Try an initial build.
$ ./build.sh
Downloading sources
[...]
Starting build of com.example.FlatpakBuilderNodeReproducer
Cache miss, checking out last cache hit
========================================================================
Building module sass in /home/hub/source/flatpak-builder-node-reproducer/.flatpak-builder/build/sass-6
========================================================================
Running: npm install -g sass
npm error code ENOTCACHED
npm error request to https://registry.npmjs.org/sass failed: cache mode is 'only-if-cached' but no cached response is available.
npm error A complete log of this run can be found in: /run/build/sass/flatpak-node/npm-cache/_logs/2025-11-24T15_35_15_031Z-debug-0.log
Error: module sass: Child process exited with code 1
Enter in a build shell
$ ./build.sh --build-shell=sass
List the cache
$ npm cache ls
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/braces/-/braces-3.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/sass/-/sass-1.94.2.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz
Notice how it doesn't contain https://registry.npmjs.org/sass. The
cache is built from the https://registry.npmjs.org/sass content.
You can confirm in that context the build still fail by running npm install -g sass.
If you do
$ npm_config_offline=false
$ npm install -g sass
It works. Because we have network as a build arg (in the manifest).
Try again offline
$ npm_config_offline=true
$ npm install -g sass
No error. If you check the cache again, it has been updated and
contain some entries that where not there before.
$ npm cache ls
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-android-arm64
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-darwin-arm64
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-darwin-x64
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-freebsd-x64
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-arm-glibc
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-arm-musl
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-arm64-glibc
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-arm64-musl
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-x64-glibc
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-linux-x64-musl
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-win32-arm64
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-win32-ia32
make-fetch-happen:request-cache:https://registry.npmjs.org/@parcel%2fwatcher-win32-x64
make-fetch-happen:request-cache:https://registry.npmjs.org/braces
make-fetch-happen:request-cache:https://registry.npmjs.org/braces/-/braces-3.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/chokidar
make-fetch-happen:request-cache:https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/detect-libc
make-fetch-happen:request-cache:https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/fill-range
make-fetch-happen:request-cache:https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/immutable
make-fetch-happen:request-cache:https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-extglob
make-fetch-happen:request-cache:https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-glob
make-fetch-happen:request-cache:https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/is-number
make-fetch-happen:request-cache:https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/micromatch
make-fetch-happen:request-cache:https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/node-addon-api
make-fetch-happen:request-cache:https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/picomatch
make-fetch-happen:request-cache:https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/readdirp
make-fetch-happen:request-cache:https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/sass
make-fetch-happen:request-cache:https://registry.npmjs.org/sass/-/sass-1.94.2.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/source-map-js
make-fetch-happen:request-cache:https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz
make-fetch-happen:request-cache:https://registry.npmjs.org/to-regex-range
make-fetch-happen:request-cache:https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz
This is what is missing from the autogenerated file.
flatpak-builder version
1.4.4
Linux distribution and version
Fedora 42
Affected flatpak-builder tool
node/flatpak-node-generator.py
flatpak-builder tool cli args
No response
Source repository URL
No response
Flatpak-builder manifest URL
https://github.com/hfiguiere/flatpak-builder-node-reproducer.git
Description
Checkout the repository above. It's a reproducer case, not meant to be a meaningfull flatpak.
Try an initial build.
Enter in a build shell
List the cache
Notice how it doesn't contain
https://registry.npmjs.org/sass. Thecache is built from the
https://registry.npmjs.org/sasscontent.You can confirm in that context the build still fail by running
npm install -g sass.If you do
It works. Because we have network as a build arg (in the manifest).
Try again offline
No error. If you check the cache again, it has been updated and
contain some entries that where not there before.
This is what is missing from the autogenerated file.