| 17 May 2023 |
hexa |
navidrome> ERROR: Missing package-lock.json from src. Expected to find it at: /build/source/source/ui/package-lock.json
| 21:20:09 |
hexa | good error message | 21:20:12 |
hexa | but once I fixed the path it went poof | 21:20:28 |
hexa | navidrome> unpacking sources
navidrome> unpacking source archive /nix/store/f51j4vbggdg3a7bq8xr8ksf3a5xs0wvv-source
navidrome> source root is source
navidrome> patching sources
navidrome> Executing npmConfigHook
navidrome> Configuring npm
navidrome> Validating consistency between /build/source/ui/package-lock.json and /nix/store/y2splh2dkp37gjkn77hqkscbsd9x89cj-npm-deps/package-lock.json
navidrome> Fixing lockfile
navidrome> Installing dependencies
navidrome> npm ERR! code EUSAGE
navidrome> npm ERR!
navidrome> npm ERR! The `npm ci` command can only install with an existing package-lock.json or
navidrome> npm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
navidrome> npm ERR! later to generate a package-lock.json file, then try again.
navidrome> npm ERR!
navidrome> npm ERR! Clean install a project
navidrome> npm ERR!
navidrome> npm ERR! Usage:
navidrome> npm ERR! npm ci
navidrome> npm ERR!
navidrome> npm ERR! Options:
navidrome> npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
navidrome> npm ERR! [-E|--save-exact] [-g|--global]
navidrome> npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
navidrome> npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
navidrome> npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
navidrome> npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
navidrome> npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
navidrome> npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
navidrome> npm ERR!
navidrome> npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
navidrome> npm ERR!
navidrome> npm ERR! Run "npm help ci" for more info
navidrome>
navidrome> npm ERR! Log files were not written due to an error writing to the directory: /nix/store/y2splh2dkp37gjkn77hqkscbsd9x89cj-npm-deps/_logs
navidrome> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
navidrome>
navidrome> ERROR: npm failed to install dependencies
navidrome>
navidrome> Here are a few things you can try, depending on the error:
navidrome> 1. Set `makeCacheWritable = true`
navidrome> Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error.
navidrome> 2. Set `npmFlags = [ "--legacy-peer-deps" ]`
navidrome>
| 21:20:32 |
hexa | https://github.com/navidrome/navidrome/blob/master/ui/package.json | 21:21:14 |
Lily Foster | Yeah I believe winter was hoping to fix the npmRoot PR later today. I think we're gonna end up just making the whole hook have a pushd/popd | 21:21:33 |
hexa | yeah, that approach did work for me 🙂 | 21:21:48 |
hexa | for update streams, what can I use to derive the hash for fetchNpmDeps? | 21:41:57 |
hexa | is it prefetch-npm-deps? | 21:42:08 |
Lily Foster | Yep, prefetch-npm-deps | 21:42:13 |
hexa | I wonder whether I remembered that wrong, but didn | 21:43:07 |
hexa | * I wonder whether I remembered that wrong, but didn't nix-update support updating those hashes? 🤔 | 21:43:18 |
Lily Foster | Yes, nix-update does update npmDeps hashes | 21:43:29 |
hexa | weird | 21:43:35 |
Lily Foster | Did it not for you? | 21:43:44 |
hexa | it went poof 😄 https://github.com/NixOS/nixpkgs/pull/229953#issuecomment-1552120774 | 21:43:57 |
hexa | tried downgrading to 0.49.2 from 0.49.3 | 21:44:09 |
Lily Foster | Wait why is the go-modules derivation running npmConfigHook 🤔 | 21:45:24 |
hexa | 😄 | 21:45:38 |
Lily Foster | Oh. The prePatch | 21:46:05 |
hexa | npmRoot fix when 😄 | 21:46:21 |
hexa | fixes the build, breaks the update workflow 😫 | 21:46:39 |
Lily Foster | Well when npmRoot is working, it should fix the update script, right? | 21:47:03 |
hexa | I would think so | 21:47:09 |
Lily Foster | Okay, wasn't sure if I was misunderstanding | 21:47:17 |
hexa | I have evcc which is basically doing the same, but without the need for npmRoot | 21:47:25 |
hexa | would be great to sort this out before the release, because I did in fact tell people about buildNpmPackage, when I asked them to migrate off of node 14/16 🙂 | 21:48:51 |
Lily Foster | I do fully intend to have these sorts of things fixed asap, since we're coming up so close on release and with the node 14/16 stuff | 21:49:45 |
Lily Foster | So I'm thinking npm is ignoring the cache because it's may ending up in this code path, which throws an error without logging and that error gets silently caught (thanks npm, real cool): https://github.com/npm/pacote/blob/3307ad9c1600b6a60b2250c2239240ac41fc7b07/lib/fetcher.js#L317 | 21:53:06 |
Lily Foster | * So I'm thinking npm is ignoring the cache because it's maybe ending up in this code path, which throws an error without logging and that error gets silently caught (thanks npm, real cool): https://github.com/npm/pacote/blob/3307ad9c1600b6a60b2250c2239240ac41fc7b07/lib/fetcher.js#L317 | 21:53:13 |