Skip to content

error: Uncaught (in promise) Error: cannot intersect: ^1.3.2 && =1.3.1 #88

Open

Description

@jatifjr

Weird things happened after installing node then installing uv

jatifjr@mac ~ % rm -rf ~/.local/*
zsh: sure you want to delete all 6 files in /Users/jatifjr/.local [yn]? y

jatifjr@mac ~ % pkgm i node
/Users/jatifjr/.local/bin/c_rehash
/Users/jatifjr/.local/bin/openssl
/Users/jatifjr/.local/bin/npx
/Users/jatifjr/.local/bin/node
/Users/jatifjr/.local/bin/makeconv
/Users/jatifjr/.local/bin/gencnval
/Users/jatifjr/.local/bin/icu-config
/Users/jatifjr/.local/bin/gencfu
/Users/jatifjr/.local/bin/icuinfo
/Users/jatifjr/.local/bin/gendict
/Users/jatifjr/.local/bin/genrb
/Users/jatifjr/.local/bin/icuexportdata
/Users/jatifjr/.local/bin/pkgdata
/Users/jatifjr/.local/bin/genbrk
/Users/jatifjr/.local/bin/derb
/Users/jatifjr/.local/bin/uconv
/Users/jatifjr/.local/sbin/gennorm2
/Users/jatifjr/.local/sbin/escapesrc
/Users/jatifjr/.local/sbin/gensprep
/Users/jatifjr/.local/sbin/icupkg
/Users/jatifjr/.local/sbin/gencmn
/Users/jatifjr/.local/sbin/genccode

jatifjr@mac ~ % pkgm list
~/.local/pkgs/npmjs.com/v11.16.0
~/.local/pkgs/nodejs.org/v26.3.0
~/.local/pkgs/openssl.org/v1.1.1w
~/.local/pkgs/zlib.net/v1.3.2
~/.local/pkgs/curl.se/ca-certs/v2026.5.14
~/.local/pkgs/unicode.org/v73.2.0

jatifjr@mac ~ % pkgm outdated

jatifjr@mac ~ % pkgm update node
no packages specified

jatifjr@mac ~ % pkgm update node@26
no packages specified

jatifjr@mac ~ % pkgm i uv
/Users/jatifjr/.local/bin/c_rehash
/Users/jatifjr/.local/bin/openssl
/Users/jatifjr/.local/bin/pkg-config
/Users/jatifjr/.local/bin/bzip2recover
/Users/jatifjr/.local/bin/bzmore
/Users/jatifjr/.local/bin/bzgrep
/Users/jatifjr/.local/bin/bzdiff
/Users/jatifjr/.local/bin/bunzip2
/Users/jatifjr/.local/bin/bzcat
/Users/jatifjr/.local/bin/bzip2
/Users/jatifjr/.local/bin/lz4
/Users/jatifjr/.local/bin/xmlwf
/Users/jatifjr/.local/bin/lzmainfo
/Users/jatifjr/.local/bin/xzdec
/Users/jatifjr/.local/bin/xz
/Users/jatifjr/.local/bin/xzless
/Users/jatifjr/.local/bin/lzmadec
/Users/jatifjr/.local/bin/xzmore
/Users/jatifjr/.local/bin/xzgrep
/Users/jatifjr/.local/bin/xzdiff
/Users/jatifjr/.local/bin/pzstd
/Users/jatifjr/.local/bin/zstdless
/Users/jatifjr/.local/bin/zstdgrep
/Users/jatifjr/.local/bin/zstd
/Users/jatifjr/.local/bin/png-fix-itxt
/Users/jatifjr/.local/bin/libpng16-config
/Users/jatifjr/.local/bin/pngfix
/Users/jatifjr/.local/bin/git2
/Users/jatifjr/.local/bin/tabs
/Users/jatifjr/.local/bin/toe
/Users/jatifjr/.local/bin/tset
/Users/jatifjr/.local/bin/clear
/Users/jatifjr/.local/bin/ncursesw6-config
/Users/jatifjr/.local/bin/tic
/Users/jatifjr/.local/bin/infocmp
/Users/jatifjr/.local/bin/tput
/Users/jatifjr/.local/bin/sqlite3
/Users/jatifjr/.local/bin/page
/Users/jatifjr/.local/bin/wish8.6
/Users/jatifjr/.local/bin/tclsh8.6
/Users/jatifjr/.local/bin/tcldocstrip
/Users/jatifjr/.local/bin/pt
/Users/jatifjr/.local/bin/critcl
/Users/jatifjr/.local/bin/mkdoc
/Users/jatifjr/.local/bin/nnslog
/Users/jatifjr/.local/bin/nnsd
/Users/jatifjr/.local/bin/dtplite
/Users/jatifjr/.local/bin/nns
/Users/jatifjr/.local/bin/uvx
/Users/jatifjr/.local/bin/uv
/Users/jatifjr/.local/bin/python3.14-config
/Users/jatifjr/.local/bin/pydoc3.14
/Users/jatifjr/.local/bin/idle3.14
/Users/jatifjr/.local/bin/python3.14

jatifjr@mac ~ % pkgm list
~/.local/pkgs/libpng.org/v1.6.58
~/.local/pkgs/tcl-lang.org/v8.6.16
~/.local/pkgs/npmjs.com/v11.16.0
~/.local/pkgs/sqlite.org/v3.53.2
~/.local/pkgs/bytereef.org/mpdecimal/v2.5.1
~/.local/pkgs/sourceware.org/libffi/v3.5.2
~/.local/pkgs/sourceware.org/bzip2/v1.0.8
~/.local/pkgs/freedesktop.org/pkg-config/v0.29.2
~/.local/pkgs/nodejs.org/v26.3.0
~/.local/pkgs/lz4.org/v1.10.0
~/.local/pkgs/openssl.org/v1.1.1w
~/.local/pkgs/tukaani.org/xz/v5.8.3
~/.local/pkgs/libgit2.org/v1.9.4
~/.local/pkgs/freetype.org/v2.14.3
~/.local/pkgs/zlib.net/v1.3.1
~/.local/pkgs/zlib.net/v1.3.2
~/.local/pkgs/gnu.org/readline/v8.3.0
~/.local/pkgs/facebook.com/zstd/v1.5.7
~/.local/pkgs/invisible-island.net/ncurses/v6.6.0
~/.local/pkgs/astral.sh/uv/v0.11.19
~/.local/pkgs/libexpat.github.io/v2.8.1
~/.local/pkgs/libssh2.org/v1.11.1
~/.local/pkgs/curl.se/ca-certs/v2026.5.14
~/.local/pkgs/unicode.org/v73.2.0
~/.local/pkgs/python.org/v3.14.5
~/.local/pkgs/x.org/x11/v1.8.11
~/.local/pkgs/x.org/protocol/v2025.1.0
~/.local/pkgs/x.org/util-macros/v1.20.2
~/.local/pkgs/x.org/xau/v1.0.12
~/.local/pkgs/x.org/xdmcp/v1.1.5
~/.local/pkgs/x.org/exts/v1.3.7
~/.local/pkgs/x.org/xcb/v1.17.0

jatifjr@mac ~ % pkgm outdated
error: Uncaught (in promise) Error: cannot intersect: ^1.3.2 && =1.3.1
  if (set.length <= 0) throw new Error(`cannot intersect: ${a} && ${b}`)
                             ^
    at Module.intersect (https://deno.land/x/libpkgx@v0.21.0/src/utils/semver.ts:382:30)
    at hydrate (https://deno.land/x/libpkgx@v0.21.0/src/plumbing/hydrate.ts:87:50)
    at async outdated (file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:660:31)
    at async file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:114:7

jatifjr@mac ~ % pkgm update node
error: Uncaught (in promise) Error: cannot intersect: ^1.3.2 && =1.3.1
  if (set.length <= 0) throw new Error(`cannot intersect: ${a} && ${b}`)
                             ^
    at Module.intersect (https://deno.land/x/libpkgx@v0.21.0/src/utils/semver.ts:382:30)
    at hydrate (https://deno.land/x/libpkgx@v0.21.0/src/plumbing/hydrate.ts:87:50)
    at async update (file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:714:31)
    at async file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:106:7

jatifjr@mac ~ % pkgm update node@26
error: Uncaught (in promise) Error: cannot intersect: ^1.3.2 && =1.3.1
  if (set.length <= 0) throw new Error(`cannot intersect: ${a} && ${b}`)
                             ^
    at Module.intersect (https://deno.land/x/libpkgx@v0.21.0/src/utils/semver.ts:382:30)
    at hydrate (https://deno.land/x/libpkgx@v0.21.0/src/plumbing/hydrate.ts:87:50)
    at async update (file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:714:31)
    at async file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:106:7

jatifjr@mac ~ % pkgm update uv
error: Uncaught (in promise) Error: cannot intersect: ^1.3.2 && =1.3.1
  if (set.length <= 0) throw new Error(`cannot intersect: ${a} && ${b}`)
                             ^
    at Module.intersect (https://deno.land/x/libpkgx@v0.21.0/src/utils/semver.ts:382:30)
    at hydrate (https://deno.land/x/libpkgx@v0.21.0/src/plumbing/hydrate.ts:87:50)
    at async update (file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:714:31)
    at async file:///Users/jatifjr/.local/share/pkgx/pkgx.sh/pkgm/v0.12.2/bin/pkgm:106:7

jatifjr@mac ~ %

I don't know if this related to either node or uv or pkgm itself, but I think it's weird that this happened.

For maintainers and contributors, I appreciate all the work and I hope you have a great day every day

Activity

  1. jhheider commented on Jun 5, 2026

    @jhheider
    Contributor

    =1.3.1 is almost certainly python's strict zlib.net requirement.

    As an experiment, if we do it by installing uv first, then node does it work? This is an interesting problem of post-hoc rewiring of dependencies after install.

  2. jatifjr commented on Jun 7, 2026

    @jatifjr
    Author

    Yes, it is an interesting problem. Yes, installing uv first then node works fine. I forgot to include it in the first post.

  3. jhheider commented on Jun 28, 2026

    @jhheider
    Contributor

    @jatifjr in order to solve this properly, we need to capture install intent. pkgm is a small surface by design, so this isn't a trivial undertaking.

    to that end, I added a self-healing manifest to allow users to both capture, and adjust installation intent to allow pkgm to solve issues like yours, where version intersections matter between requested packages (uv and node), but all requested packages should contribute to the graph intersection, so you get the correct zlib=1.3.1 as a transient dependency from python from uv, regardless of the order (or anything that happens in the future).

    #89 is my attempt. of you want to try it and see if it fixes your specific use case, you should be able to replace your pkgm script with this: https://raw.githubusercontent.com/pkgxdev/pkgm/91e28633bb2246a1e987b1757dd393a90d4b6182/pkgm.ts .

    let me know if that solves your problem. the theory is that it should prevent this class of problems going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions