Open disassembler opened 4 years ago
I'm running into the same thing with redux. In our package.json
we have a
"resolutions": {
"redux": 3.7.2
}
to fix the dependency. In the resulting yarn.lock
file we have
redux@3.7.2, "redux@>=0.10 <5", redux@^3.6.0, redux@^3.7.2, redux@^4.0.0, redux@^4.0.1, redux@^4.0.4:
version "3.7.2"
resolved "redux___redux_3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==
dependencies:
lodash "^4.2.1"
lodash-es "^4.2.1"
loose-envify "^1.1.0"
symbol-observable "^1.0.3"
When trying to build we get
simspace-portal-modules> [1/4] Resolving packages...
simspace-portal-modules> warning Lockfile has incorrect entry for "redux@^4.0.1". Ignoring it.
simspace-portal-modules> warning Lockfile has incorrect entry for "redux@^4.0.0". Ignoring it.
simspace-portal-modules> warning Lockfile has incorrect entry for "redux@^4.0.4". Ignoring it.
simspace-portal-modules> error Couldn't find any versions for "redux" that matches "^4.0.1" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
simspace-portal-modules> info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
simspace-portal-modules> Error: Couldn't find any versions for "redux" that matches "^4.0.0" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
simspace-portal-modules> at MessageError.ExtendableBuiltin (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:721:66)
simspace-portal-modules> at new MessageError (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:750:123)
simspace-portal-modules> at NpmResolver.<anonymous> (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:50632:15)
simspace-portal-modules> at Generator.next (<anonymous>)
simspace-portal-modules> at step (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:310:30)
simspace-portal-modules> at /nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:321:13
simspace-portal-modules> Error: Couldn't find any versions for "redux" that matches "^4.0.4" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
simspace-portal-modules> at MessageError.ExtendableBuiltin (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:721:66)
simspace-portal-modules> at new MessageError (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:750:123)
simspace-portal-modules> at NpmResolver.<anonymous> (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:50632:15)
simspace-portal-modules> at Generator.next (<anonymous>)
simspace-portal-modules> at step (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:310:30)
simspace-portal-modules> at /nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:321:13
simspace-portal-modules> Error: Couldn't find any versions for "redux" that matches "^4.0.4" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
simspace-portal-modules> at MessageError.ExtendableBuiltin (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:721:66)
simspace-portal-modules> at new MessageError (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:750:123)
simspace-portal-modules> at NpmResolver.<anonymous> (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:50632:15)
simspace-portal-modules> at Generator.next (<anonymous>)
simspace-portal-modules> at step (/nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:310:30)
simspace-portal-modules> at /nix/store/70l4gnvcal045py1cmz8l57jx89xd3sh-yarn-1.22.0/libexec/yarn/lib/cli.js:321:13
If I edit the yarn.lock
file to set all the redux dependencies to 3.7.2 things go much better.
I think this maybe related to the package.json
created by mkYarnModules
that is at the top level and contains { "private":true, "workspaces":["deps/**"]}
.
When I use a different derivation that doesn't introduce this and instead just uses my projects package.json
, I no longer have this problem.
I have to apply this patch to my yarn.lock every time it's regenerated:
With or without the patch, yarn install works fine, but without the patch if I try to
nix-build -A cardano-graphql
I get:This can be reproduced on
yarn-lock-broken
branch at https://github.com/input-output-hk/cardano-graphql