ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.25k stars 163 forks source link

`ujust update` nevers updates npm and displays message `npm: IGNORED` #1912

Closed marzvrover closed 1 week ago

marzvrover commented 1 week ago

Describe the bug

ujust update always ignores npm.

── 00:36:36 - Node Package Manager ─────────────────────────────────────────────
(node:47875) ExperimentalWarning: CommonJS module /var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
npm error code EEXIST
npm error syscall symlink
npm error path ../../../lib/node_modules/npm/man/man5/package-json.5
npm error dest /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error errno -17
npm error EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man5/package-json.5' -> '/var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5'
npm error File exists: /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /var/home/marzvrover/.npm/_logs/2024-11-09T05_36_36_758Z-debug-0.log

It originally threw the error saying /home/linuxbrew/.linuxbrew/lib/node_modules/npm/man/man7/package-spec.7 already exists. I renamed that file, but the package-json.5 file didn't work with the same workaround.

npm log:

0 verbose cli /var/home/linuxbrew/.linuxbrew/Cellar/node/23.1.0_1/bin/node /home/linuxbrew/.linuxbrew/bin/npm
1 info using npm@10.9.0
2 info using node@v23.1.0
3 silly config load:file:/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/npmrc
4 silly config load:file:/var/home/marzvrover/.npmrc
5 silly config load:file:/home/linuxbrew/.linuxbrew/etc/npmrc
6 verbose title npm update
7 verbose argv "update" "--location" "global"
8 verbose logfile logs-max:10 dir:/var/home/marzvrover/.npm/_logs/2024-11-09T05_36_36_758Z-
9 verbose logfile /var/home/marzvrover/.npm/_logs/2024-11-09T05_36_36_758Z-debug-0.log
10 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
11 silly logfile start cleaning logs, removing 2 files
12 silly logfile done cleaning log files
13 silly idealTree buildDeps
14 silly fetch manifest corepack@*
15 silly packumentCache full:https://registry.npmjs.org/corepack cache-miss
16 http fetch GET 200 https://registry.npmjs.org/corepack 175ms (cache revalidated)
17 silly packumentCache full:https://registry.npmjs.org/corepack set size:181642 disposed:false
18 silly fetch manifest npm@*
19 silly packumentCache full:https://registry.npmjs.org/npm cache-miss
20 http fetch GET 200 https://registry.npmjs.org/npm 137ms (cache revalidated)
21 silly packumentCache full:https://registry.npmjs.org/npm set size:22153539 disposed:false
22 silly placeDep ROOT corepack@0.29.4 OK for:  want: *
23 silly placeDep ROOT npm@10.9.0 OK for:  want: *
24 silly reify mark retired [
24 silly reify   '/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm',
24 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/npm',
24 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/npx'
24 silly reify ]
25 silly reify mark retired [
25 silly reify   '/var/home/linuxbrew/.linuxbrew/lib/node_modules/corepack',
25 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/corepack',
25 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/pnpm',
25 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/pnpx',
25 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/yarn',
25 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/yarnpkg'
25 silly reify ]
26 silly reify moves {
26 silly reify   '/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm': '/var/home/linuxbrew/.linuxbrew/lib/node_modules/.npm-DWXQ34gR',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/npm': '/var/home/linuxbrew/.linuxbrew/bin/.npm-rAgpfMp8',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/npx': '/var/home/linuxbrew/.linuxbrew/bin/.npx-23OzGO5s',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/lib/node_modules/corepack': '/var/home/linuxbrew/.linuxbrew/lib/node_modules/.corepack-g5u6DObu',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/corepack': '/var/home/linuxbrew/.linuxbrew/bin/.corepack-jpzrvJzw',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/pnpm': '/var/home/linuxbrew/.linuxbrew/bin/.pnpm-2e40euFX',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/pnpx': '/var/home/linuxbrew/.linuxbrew/bin/.pnpx-oMDhfs8C',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/yarn': '/var/home/linuxbrew/.linuxbrew/bin/.yarn-4HziENPj',
26 silly reify   '/var/home/linuxbrew/.linuxbrew/bin/yarnpkg': '/var/home/linuxbrew/.linuxbrew/bin/.yarnpkg-ahL3FR1T'
26 silly reify }
27 verbose stack Error: EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man5/package-json.5' -> '/var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5'
27 verbose stack     at async symlink (node:internal/fs/promises:1002:10)
27 verbose stack     at async Promise.all (index 12)
27 verbose stack     at async Promise.all (index 1)
27 verbose stack     at async #createBinLinks (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:394:5)
27 verbose stack     at async Promise.allSettled (index 1)
27 verbose stack     at async #linkAllBins (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:375:5)
27 verbose stack     at async #build (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:160:7)
27 verbose stack     at async Arborist.rebuild (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:62:5)
27 verbose stack     at async [reifyPackages] (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
27 verbose stack     at async Arborist.reify (/var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
28 error code EEXIST
29 error syscall symlink
30 error path ../../../lib/node_modules/npm/man/man5/package-json.5
31 error dest /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
32 error errno -17
33 error EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man5/package-json.5' -> '/var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5'
34 error File exists: /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
35 error Remove the existing file and try again, or run npm
36 error with --force to overwrite files recklessly.
37 silly unfinished npm timer reify 1731130597345
38 silly unfinished npm timer reify:build 1731130599775
39 silly unfinished npm timer build 1731130599776
40 silly unfinished npm timer build:deps 1731130599776
41 silly unfinished npm timer build:link 1731130599790
42 silly unfinished npm timer build:link:node_modules/npm 1731130599791
43 verbose cwd /usr/share/ublue-os
44 verbose os Linux 6.11.3-200.fc40.x86_64
45 verbose node v23.1.0
46 verbose npm  v10.9.0
47 verbose exit -17
48 verbose code -17
49 error A complete log of this run can be found in: /var/home/marzvrover/.npm/_logs/2024-11-09T05_36_36_758Z-debug-0.log

What did you expect to happen?

For it to update npm

Output of rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 2h 19min ago
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:gts
                   Digest: sha256:ce229276547c39075cda5854d3c09e0c9c83c891a2f177d4600b4704af667ff2
                  Version: 40.20241102.0 (2024-11-03T17:58:29Z)
          LayeredPackages: waydroid

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:gts
                   Digest: sha256:ce229276547c39075cda5854d3c09e0c9c83c891a2f177d4600b4704af667ff2
                  Version: 40.20241102.0 (2024-11-03T17:58:29Z)

Output of groups

marzvrover wheel

Extra information or context

No response

castrojo commented 1 week ago

What happens if you try to update npm by hand? Via a brew update or something?

marzvrover commented 1 week ago

@castrojo I was under the impression the intent is to update npm packages. Both brew update and npm update appear to work; with npm showing some warnings.

❯ brew update
==> Updating Homebrew...
Updated 1 tap (homebrew/cask).
==> Outdated Formulae
c-ares

You have 1 outdated formula installed.
You can upgrade it with brew upgrade
or list it with brew outdated.

~ took 4s 
❯ brew upgrade
==> Upgrading 1 outdated package:
c-ares 1.34.2 -> 1.34.3
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/manifests/1.34.3
######################################################################### 100.0%
==> Fetching c-ares
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/blobs/sha256:ad86ef643c7
######################################################################### 100.0%
==> Upgrading c-ares
  1.34.2 -> 1.34.3 
==> Pouring c-ares--1.34.3.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/c-ares/1.34.3: 176 files, 1.2MB
==> Running `brew cleanup c-ares`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /home/linuxbrew/.linuxbrew/Cellar/c-ares/1.34.2... (176 files, 1.2MB)
Removing: /var/home/marzvrover/.cache/Homebrew/c-ares_bottle_manifest--1.34.2... (7.3KB)
Removing: /var/home/marzvrover/.cache/Homebrew/c-ares--1.34.2... (364.5KB)

~ took 4s 
❯ npm update
(node:12145) ExperimentalWarning: CommonJS module /var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /var/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

up to date in 534ms
tulilirockz commented 1 week ago

I believe this can be closed, this is mainly a Homebrew/NPM problem, im sorry but we arent explicitly supporting this (anymore). Hope you can fix that, try contacting people on the Universal Blue Discord