-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetchYarnDeps: couldn't find any versions but yarn install works #203708
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/mkyarnpackage-lockfile-has-incorrect-entry/21586/5 |
I had the same issue for Marp. I think I found the root cause in my case. |
I do not have the derivation lying around anymore, but the build output was identical; it would have looked something like the example from the discourse thread: { lib, stdenv, fixup_yarn_lock, callPackage, yarn, nodejs-slim }:
stdenv.mkDerivation {
pname = "foo";
version = "1.0.0";
src = lib.cleanSource ./.;
yarnOfflineCache = (callPackage ./yarn.nix {}).offline_cache;
# or fetchYarnDeps
nativeBuildInputs = [
fixup_yarn_lock yarn nodejs-slim
];
configurePhase = ''
export HOME=$NIX_BUILD_TOP
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
fixup_yarn_lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
'';
buildPhase = ''
...
'';
installPhase = ''
...
# if the node_modules dir is needed at runtime, move it to $out/libexec here
'';
} |
Should be fixed since this PR merge |
Describe the bug
while packaging #114305,
mkYarnPackage
appears to be incorrectly setting up yarn-offline-mirror.Steps To Reproduce
Steps to reproduce the behavior:
legacyPackages
pointer to:Additional context
I have manually confirmed that this is not just an issue with
mkYarnPackage
it reproduces with a minimal stdenv too. I have also regenerating theyarn.lock
file usingrm yarn.lock && yarn install
only makes things worse:Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: